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/expected/htmlSanitizeTest src/lib/tests/expected/htmlSanitizeTest index 4e52ec6ac03..5a9d6b454ce 100644 --- src/lib/tests/expected/htmlSanitizeTest +++ src/lib/tests/expected/htmlSanitizeTest @@ -41,33 +41,33 @@ out: (removed an iframe, we only allow one that plays a video from a site we know) in :

p

out:

p

in : wordmore out: wordmore in :
bold

para out:

bold

para

in :
the rest of the page is not inside that div out:
the rest of the page is not inside that div
-in : text +in : text out: text - (removed the svg element and everything inside it) + (removed the object element and everything inside it) in : link text and more text out: link text and more text in :

after

out:

after

(removed the form element and everything inside it) in :

shown

out:

shown

in :

M

tsame page other pageto the top
no name at all
out:

M

tsame page other pageto the top
no name at all
in :
cell
@@ -82,15 +82,41 @@ in : ax out: ax (removed a link that used the javascript: scheme) in :

real

Mjump out:

M

jump +in : + +out: + + +in : +out: + +in :

text

+out:

text

+ (removed the attribute onload) + (removed the script element and everything inside it) + (removed a link that used the javascript: scheme) + +in : +out: + (removed the value of the svg attribute fill) + (removed the value of the svg attribute stroke) + +in : +out: + (removed the defs element and everything inside it) + +in : text after +out: text after +