363ca5c576b616861e58d410da17f24cc562db96 kate Mon May 11 16:56:59 2020 -0700 Use existing backdoor to allow HTML tags for styling in trackUi title bar. Request of MarkD to include parent short label in supertrack member title (show hierarchy), prompted motivation to expand styling. refs #24948 diff --git src/hg/hgTrackUi/hgTrackUi.c src/hg/hgTrackUi/hgTrackUi.c index 5f7554a..738c147 100644 --- src/hg/hgTrackUi/hgTrackUi.c +++ src/hg/hgTrackUi/hgTrackUi.c @@ -3638,31 +3638,33 @@ char title[1000]; if (tdb->parent) { safef(title, sizeof title, // TODO: replace in-line styling with class "<span style='background-color: #c3d4f4; " "padding-left: 10px; padding-right: 10px;" "margin-right: 10px; margin-left: -8px;'>" "%s</span> %s", tdb->parent->shortLabel, tdb->shortLabel); } else safef(title, sizeof title, "%s", tdb->shortLabel); char *titleEnd = (tdbIsSuper(tdb) ? "Tracks" : tdbIsDownloadsOnly(tdb) ? DOWNLOADS_ONLY_TITLE : "Track Settings"); + htmlNoEscape(); // allow HTML tags to format title blue bar (using short label) cartWebStart(cart, database, "%s %s", title, titleEnd); + htmlDoEscape(); trackUi(tdb, tdbList, ct, FALSE); printf("<BR>\n"); jsonPrintGlobals(); webEnd(); } } char *excludeVars[] = { "submit", "Submit", "g", NULL, "ajax", NULL,}; int main(int argc, char *argv[]) /* Process command line. */ { long enteredMainTime = clock1000(); cgiSpoof(&argc, argv); cartEmptyShell(doMiddle, hUserCookie(), excludeVars, NULL);