Fix: normalize SVG tag and attribute names, add version (#11586)

This commit is contained in:
shamoon
2025-12-11 19:17:55 -08:00
committed by GitHub
parent 66d363bdc5
commit 3f81b432ec

View 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",
}