3bc237f2fea899a81e6f06bacd111b1e2c8a1a71 kate Wed Apr 14 08:34:37 2021 -0700 Adjust HTML to work with description summary on supertrack member track UI. refs #24948 diff --git src/hg/hgTrackUi/hgTrackUi.c src/hg/hgTrackUi/hgTrackUi.c index 6058ef3..1453dae 100644 --- src/hg/hgTrackUi/hgTrackUi.c +++ src/hg/hgTrackUi/hgTrackUi.c @@ -3100,30 +3100,31 @@ struct trackDb *tdbParent = tdb->parent; printf("<b>Track collection: " "<img height=12 src='../images/ab_up.gif'>" "<a href='%s?%s=%s&c=%s&g=%s'>%s </b></a>", hgTrackUiName(), cartSessionVarName(), cartSessionId(cart), chromosome, cgiEncode(tdbParent->track), tdbParent->longLabel); printf("<p>"); if (tdbParent->html) { // collapsed panel for Description printf("<p><table>"); // required by jsCollapsible jsBeginCollapsibleSectionFontSize(cart, tdb->track, "superDescription", "Description", FALSE, "medium"); + // TODO: better done with regex char *html = replaceChars(tdbParent->html, "<H", "<h"); html = replaceChars(html, "</H", "</h"); // remove Description header html = replaceChars(html, "<h2>Description</h2>", ""); html = replaceChars(html, "<h3>Description</h3>", ""); html = replaceChars(html, "<h1>Description</h1>", ""); // remove everything after Description text char *end = stringIn("<h2>", html); if (!end) end = stringIn("<h1>", html); if (!end) end = stringIn("<h3>", html); if (end)