Skip to content

svg-sanitization

Flags SVGs containing <script>, XML entities, javascript: URIs, <foreignObject>, <iframe>, <embed> or inline event handlers.

  • Severity: error
  • Enabled by default: yes

How to fix it

Strip the flagged elements or attributes from the SVG.

Configuration

{ "rules": { "svg-sanitization": "error" } }

All rules