mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-05 20:32:27 +00:00
[security] replace innerHTML in RevertModal.js
Migrated `js/ui/components/RevertModal.js` to safe DOM APIs (`createElement`, `textContent`, `DOMParser`). Extracted rendering logic to `js/ui/components/revertModalRenderers.js`. Updated baseline in `scripts/check-innerhtml.mjs` (0 remaining usages). Updated tests to mock DOMParser. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
83587ea3ea
commit
f676fb2ff5
9 files changed
+1001
-621
No files matched your search
@@ -0,0 +1,16 @@
|
||||
# Test Log
|
||||
|
||||
* **Initial State:**
|
||||
* File selected: `js/ui/components/RevertModal.js`
|
||||
* `innerHTML` count: 10
|
||||
|
||||
* **Verification:**
|
||||
* `npm run lint`: Passed (file size check passed after extraction).
|
||||
* `npm run test:unit`: Passed (fixed `DOMParser` reference error).
|
||||
* `node scripts/check-innerhtml.mjs --report`: `RevertModal.js` absent (count 0).
|
||||
|
||||
* **Artifacts:**
|
||||
* `js/ui/components/RevertModal.js` (Modified)
|
||||
* `js/ui/components/revertModalRenderers.js` (Created)
|
||||
* `scripts/check-innerhtml.mjs` (Updated baseline)
|
||||
* `tests/modal-accessibility.test.mjs` (Updated test harness)
|
||||
Reference in new issue
Block a user