]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix: normalize SVG tag and attribute names, add version (#11586)
authorshamoon <4887959+shamoon@users.noreply.github.com>
Fri, 12 Dec 2025 03:17:55 +0000 (19:17 -0800)
committerGitHub <noreply@github.com>
Fri, 12 Dec 2025 03:17:55 +0000 (19:17 -0800)
src/paperless/validators.py

index dea1f518511a9e696f41b44c669f0b59495e1bd0..beb87d7b3400b27e4e90d8d9f937e2829483d371 100644 (file)
@@ -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",
 }