logoalt Hacker News

css_apologistlast Thursday at 9:50 PM2 repliesview on HN

is santizing SVGs hard, or just everyone forgets they can contain js?


Replies

rslashuserlast Thursday at 11:11 PM

I gather from the HN discussion that it's not simple to disable scripting in an SVG, in retrospect a tragically missing feature.

I guess the next step is to propose a simple "noscripting" attribute, which if present in the root of the SVG doc inhibits all scripting by conforming renderers. Then the renderer layer at runtime could also take a noscripting option, so the rendering context could force it if appropriate. Surely someone at HN is on this committee, so see what you can do!

Edit: thinking about it a little more - maybe it's best to just require noscripting as a parameter to the rendering function. Then the browsers can have a corresponding checkbox to control SVG scripting and that's it.

show 2 replies
AmbroseBiercelast Thursday at 10:19 PM

User name checks out.

show 1 reply