cf3880c50c550e4deb61c9664f4f994e13ab6dd8
max
Mon Aug 17 08:05:58 2026 -0700
hgc/hgTracks: fix three items from the v502 code review, refs #38106
Shared BLAT alignment links (hgc g=htcBlatAlign) drew the page and then
exit(0), which skips main's cartCheckout, so the loaded session was never
written back and the recipient's cart ended up nearly empty. Add
cartCheckout(&cart) before all four exit(0) calls that follow webEndGb(),
including the two early error returns.
squishCodonFont() decided FreeType was active with a looser test than
maybeNewFonts(), missing the requirement that the font name match a row in
freeTypeFonts[]; when they disagreed the bitmap engine got a cell height it
cannot render. Factor the engine decision into freeTypeFontActive() and use
it in both places.
Query name, chrom and a hub's organism string went raw into single-quoted JS
string literals and page titles on the modern alignment page; the shared-link
path reads the query name back out of a bigPsl, so it is not covered by
hgBlat's whitelist. javaScriptLiteralEncode the JS arguments and htmlEncode
the HTML labels.
Also add "u"/"s" (the shared-link session selectors) to hgc excludeVars so
they are not left in the reader's cart.
diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index 8f9d8dd4998..718a3979520 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -9062,30 +9062,39 @@
static void showSomeAlignmentModern(struct psl *psl, bioSeq *oSeq, enum gfType qType,
int qStart, int qEnd, char *qName, int cdsS, int cdsE, boolean blatContext)
/* Modern single-page version of showSomeAlignment: a gold title bar, a full-height "jump to"
* sidebar, then an "Alignment summary" and the base-by-base alignment inlined below with steel-blue
* section headers, so the whole page scrolls (no