From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 12 Dec 2025 03:17:55 +0000 (-0800) Subject: Fix: normalize SVG tag and attribute names, add version (#11586) X-Git-Tag: v2.20.2~1^2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f81b432ece96af8c5d956e8ae15123d5a127440;p=thirdparty%2Fpaperless-ngx.git Fix: normalize SVG tag and attribute names, add version (#11586) --- diff --git a/src/paperless/validators.py b/src/paperless/validators.py index dea1f51851..beb87d7b34 100644 --- a/src/paperless/validators.py +++ b/src/paperless/validators.py @@ -14,10 +14,10 @@ ALLOWED_SVG_TAGS: set[str] = { "text", "tspan", "defs", - "linearGradient", - "radialGradient", + "lineargradient", + "radialgradient", "stop", - "clipPath", + "clippath", "use", "title", "desc", @@ -52,14 +52,14 @@ ALLOWED_SVG_ATTRIBUTES: set[str] = { "y1", "x2", "y2", - "gradientTransform", - "gradientUnits", + "gradienttransform", + "gradientunits", "offset", "stop-color", "stop-opacity", "clip-path", - "viewBox", - "preserveAspectRatio", + "viewbox", + "preserveaspectratio", "href", "xlink:href", "font-family", @@ -68,6 +68,7 @@ ALLOWED_SVG_ATTRIBUTES: set[str] = { "text-anchor", "xmlns", "xmlns:xlink", + "version", }