7a356d85dba1647c6d918b315e075da7e31ab7cb
braney
Sat Sep 26 12:10:36 2026 -0700
htmlSanitize: keep simple svg drawings in hub description pages, refs #38428
Description pages that draw small svg shapes, such as a colour legend, came
out empty. svg, g, circle, ellipse, rect, line, polyline, polygon and path
now come through with their size, position, fill and stroke attributes.
Other svg elements are left out.
Over the 5390-page hub corpus only the 32 pages that contain an svg
change, and no page's text changes.
diff --git src/lib/tests/htmlSanitizeTest.c src/lib/tests/htmlSanitizeTest.c
index cd081f855cd..6d4595e3670 100644
--- src/lib/tests/htmlSanitizeTest.c
+++ src/lib/tests/htmlSanitizeTest.c
@@ -25,56 +25,77 @@
/* ordinary links are left alone, and a new window does not get a handle on ours */
"ua",
/* an image keeps its source, not its onerror */
"",
/* a frame survives only when it plays a video from a host we know */
""
"",
/* the style attribute is filtered a property at a time */
"
p
",
/* unknown elements lose their tag and keep their text */
"wordmore",
/* tags left open are closed for us, and a slash does not close one of these */
"
bold
para",
"
the rest of the page is not inside that div",
/* a page built of tags that are never closed is not a way to make us work all day */
-"