Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
felixfbecker
· 5y ago · 0 comments
GitHub raw endpoints do it. They will either serve the SVG without an image/svg+xml Content-Type, making it not render in the browser, or you have to append ?sanitize=true to the URL which will, as the name suggest, sanitize it.
Comments
[–]
reflectiv
5y ago
ok but that is github...parent poster stated its common to do that...it is not.
[–]
detaro
5y ago
It's web security 101 for handling user uploads. (although in the case of SVG most sites solve it by just not accepting "weird" formats like SVG)