Skip to content

Update SVG sanitizer to conform to SVG 1.1

Stan Hu requested to merge stanhu/gitlab-ce:fix-sanitize-svg into master

Original SVG sanitizer would strip out necessary elements and attributes.

Use a custom Loofah scrubber since sanitize 2.x transformers are inadequate to handle case-sensitive SVG attributes since they parse documents as HTML instead of XML, which causes all SVG attribute names (e.g. viewBox) to be downcased.

Closes #14555 (closed)

Merge request reports