yuin / goldmark

:trophy: A markdown parser written in Go. Easy to extend, standard(CommonMark) compliant, well structured.
MIT License
3.68k stars 255 forks source link

renderer: image/svg is also safe #298

Closed vincentbernat closed 2 years ago

vincentbernat commented 2 years ago

When used in an image context, SVG cannot execute scripts, be styled or fetch additional resources. So, they are as safe as other formats.

When used in a <a> tag, it could starts executing JS, but only in its own context, so it shouldn't be dangerous either.

This raises the question on which image format is dangerous.