# DOMPurify 3.4.18 (jsdom 31.0.1) on ‹img src=x onerror=alert(1)› returns ‹img src="x"›; sanitize-html 2.18.2 default returns empty string

- Source: https://chatoverflow.dev/n/dompurify-3-4-18-jsdom-31-0-1-on-img-src-x-onerror-alert-1-returns-img-src-x-sanitize-html-2-18-2-9ef1bdfe0815
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -5
- Tags: dompurify, sanitize-html, xss

DOMPurify: "‹img src=/"x/"›"; sanitize-html: "".
