81d7cff6cb6665feb772b1339b6298273a3c49be
max
  Thu Aug 6 08:24:38 2026 -0700
hgBlat new results page: table redesign, rename modal, share link, and an XSS fix

Iterates on the new hgBlat "table" results page (rendered by hg/js/hgBlat.js from
JSON emitted by hgBlat.c) per feedback on #37893:

- Columns: "Open in Genome Browser" (position link + new-tab icon), "Show"
(base alignment), Query coverage moved before Locus, score-scaled bar in the
Score column, Identity as plain %, comma-formatted Span. Locus is plain text,
clipped with a CSS ellipsis (full value in title).
- Tooltips on every action link and every column header (via the existing
convertTitleTagsToMouseovers mechanism).
- "Rename BLAT Track": a real modal dialog (replaces the old inline toggle form),
reusing the existing hgc buildBigPsl call via a new window.blatRenameCt() helper;
it no longer depends on a generic page-global. New cfg fields canRename /
trackName / trackDescription drive it.
- "Share a link": trash-backed stable URL toggle, with a share-nodes icon.
- Security: cgiEncode the query name in the htcUserAli detailsUrl (its sibling
already did), and htmlEncode every URL before it goes into an href in hgBlat.js,
so a crafted query/sequence name can't break out of the attribute (XSS).
- Shared htmlEncode() moved into hg/js/utils.js for reuse instead of a per-file
escaper.
- hg.conf: blatNewPageBanner (invite banner, default off), blatOldTracks
(keep/hide/delete previous BLAT tracks at creation) documented in ex.hg.conf;
hgc.c tags BLAT tracks with blatResult=on and clears prior ones per blatOldTracks.

refs #37893

diff --git src/product/ex.hg.conf src/product/ex.hg.conf
index 00191bbf56b..27587450cd7 100644
--- src/product/ex.hg.conf
+++ src/product/ex.hg.conf
@@ -649,30 +649,40 @@
 # Suppress creation of thumbnails and associated warnings.  Must
 # be set to "on" to disable thumbnail creation.
 #sessionThumbnail.suppress=on
 
 # deactivate the hgMirror CGI on this machine
 # hgMirror is currently only supported on the GBIB VirtualMachine
 # default is 0
 # allowHgMirror=1
 
 # Turn off option to save blat results as a custom track. Default is on.
 # useBlatBigPsl=off
 
 # number of sequences allowed to submit to on-line blat, default is 25
 # hgBlat.maxSequenceCount=25
 
+# What to do with earlier BLAT result custom tracks when a new BLAT search adds one, so the
+# user is not confused about which results are current.  Values: keep (default, do nothing) |
+# hide (leave earlier BLAT tracks in the session but set them to hide) | delete (remove them
+# from the session).  Only affects tracks BLAT created (tagged blatResult=on).
+# blatOldTracks=keep
+
+# Advertise the new BLAT results table page with a banner on the classic results page.
+# Default is off (the new page is still under test); set to on to show the invitation.
+# blatNewPageBanner=on
+
 # use a database other than hgFixed for the location of genbank table like gbCdnaInfo
 # genbankDb=hgFixed
 
 # use a table other than clade to hold the mappings from clades to their labels
 # cladeTableName=clade
 #
 # use a table other than genomeClade to hold the mappings from genome to clade
 # genomeCladeTableName=genomeClade
 #
 # use a table other than defaultDb to hold the default assembly for a genome
 # defaultDbTableName=defaultDb
 #
 # use a table other than dbDb to describe attributes of installed assemblies
 # dbDbTableName=dbDb
 #