Skip to main content


SVG images aren’t just images, they’re documents and it’s not safe to serve random people’s svg images on your website.

Here’s a tool that fixes it, and sanitizes #SVG #images to make them as innocent as a JPEG:
https://github.com/cloudflare/svg-hush

(In #Rustlang, of course)
in reply to Kornel

@federicomena does librsvg sanitize SVG before rendering? I'm thinking of how GTK calls into librsvg to render svg files.
in reply to Chris 🌱

No explicit sanitization step, but it has a policy about loading external resources (see the docs), and catches things like circular references and exponential growth in <use>.
in reply to Federico Mena Quintero

limits to catch explosion of elements: https://gitlab.gnome.org/GNOME/librsvg/-/blob/main/src/limits.rs