Commit e452056
Replace innerHTML with DOMParser to fix Codacy XSS warning
Use DOMParser.parseFromString() to parse trusted HTML content into
DOM nodes, then append them to the target element. This eliminates
all direct innerHTML assignments that Codacy flags as XSS risks,
while preserving identical rendering behavior.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Michael Garber <michael.garber@hashgraph.com>1 parent 1b0e43b commit e452056
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| 175 | + | |
174 | 176 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
179 | 182 | | |
180 | 183 | | |
181 | 184 | | |
| |||
0 commit comments