aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Utility/sanitizeHtml.test.ts
Commit message (Collapse)AuthorAgeFilesLines
* fix(security): sanitize third-party RSS HTML before {@html}Fuwn31 hours1-0/+57
The /updates page rendered manga/novel feed fields (content, titles, series names) from mangaupdates/syosetu/wlnupdates via {@html} with no sanitization. CSP already blocks script execution, but injected markup could still phish, redirect, or track. Add sanitizeFeedHtml (DOMPurify with a small safe allow-list) and apply it on ingest. A behaviour-gate test plus a check against the live mangaupdates feed confirm legitimate formatting (entities, <i>/<b>/<a href>) is preserved while <script>, event handlers, <iframe>/<meta>/<style> and javascript: URLs are removed.