ed65d23618ec85f58df1bc341199e904fab55929
lrnassar
Fri Sep 18 00:40:10 2026 -0700
hgTrackUi: substitute description page variables once, and in the container excerpt too. refs #38283
Removes the hVarSubstTrackDbHtml call in doMiddle. trackUi already calls it at each
of the two places that go on to print tdb->html, each after its own quickLift
getTrackHtml swap, so the doMiddle call was a second pass over the same text. That
second pass ate the escape in $$db, which reached the reader as hg38 in hgTrackUi
while hgc correctly showed $db. The plain ajax path returns before any html is
printed, so it loses nothing.
The Description panel at the top of a subtrack's settings page shows an excerpt of
its container's page, and nothing had substituted that one. A hub page using ${db}
or ${organism} in its opening paragraph showed the text raw there while the same
page rendered correctly further down the screen.
diff --git src/hg/hgTrackUi/hgTrackUi.c src/hg/hgTrackUi/hgTrackUi.c
index 566c540ee23..711f96846c5 100644
--- src/hg/hgTrackUi/hgTrackUi.c
+++ src/hg/hgTrackUi/hgTrackUi.c
@@ -3738,30 +3738,33 @@
// show super-track info
struct trackDb *tdbParent = tdb->parent;
printf("Configure track container: "
"
"
"%s ",
hgTrackUiName(), cartSessionVarName(), cartSessionId(cart),
database, chromosome, cgiEncode(tdbParent->track), tdbParent->longLabel);
printf("
"); if (tdbIsFacetedComposite(tdb)) return; if (tdbParent->html) { + // the excerpt below is the container's own description page, so it needs the same + // substitution the track's page gets further down + hVarSubstTrackDbHtml(cart, tdbParent, database); // collapsed panel for Description printf("