News for hackers. Stuff that matters.
Re:Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection... by kccqzy on Tuesday February 24, 2026 @10:55AM (#47138677)
If you just serve SVGs through <img> tag it’ll be much safer. I never understood the appeal of inline <svg> anyways.
Re:Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection... by rwj on Tuesday February 24, 2026 @11:58AM (#47139423)
Inline reduces round trips.
Re:Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection... by toast0 on Tuesday February 24, 2026 @12:11PM (#47139618)
You can use img with a data url?
Re:Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection... by lenkite on Tuesday February 24, 2026 @12:19PM (#47139753)
Inline SVG is stylable with CSS styles in the same HTML page.
Re:Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection... by runarberg on Tuesday February 24, 2026 @02:01PM (#47141124)
Also animatible with the same context (Animation API, etc.) as the parent page, so different SVGs can influence each other’s animations.