3842ba31ab0b697b0d4026b5751da7dac7c84e35
braney
Tue Sep 29 13:49:49 2026 -0700
htmlSanitize: keep the stdTbl and copyLinkSpan class names, refs #38126
GenArk description pages use these two classes from our own stylesheet and
scripts: stdTbl for bordered tables, and copyLinkSpan with data-target for
the Copy button next to the share link. They now come through, and
data-target gets the same prefix as the id it names.
Style values are now read the same way on every pass, so a page that is
saved again comes out unchanged.
Over the 5390-page hub corpus, 278 pages change, all in class or
data-target only, and no page's text changes.
diff --git src/lib/tests/htmlSanitizeTest.c src/lib/tests/htmlSanitizeTest.c
index 6d4595e3670..e95f95f1134 100644
--- src/lib/tests/htmlSanitizeTest.c
+++ src/lib/tests/htmlSanitizeTest.c
@@ -1,121 +1,136 @@
/* htmlSanitizeTest - check that htmlSanitize keeps what it should and drops the rest. */
/* Copyright (C) 2026 The Regents of the University of California
* See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */
#include "common.h"
#include "htmlSanitize.h"
static char *cases[] = {
/* a whole pasted document comes out as the article it was meant to be */
"
T"
"
Head
Text
",
/* script and style go, with their contents */
"
before
after
",
/* a script that is never closed takes the rest with it */
"