2bcc3cdc8c4d2bf0028b52de8c9a554b5bd28b6f
chmalee
  Mon Jul 27 10:49:08 2026 -0700
polish hub track names in bigPsl alignment links, refs #37490

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index 1176e8aafed..8ea4709b154 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -3573,35 +3573,40 @@
 	}
     if (!showEvery && !firstTime)
 	break;
     }
 if (!firstTime)
     printf("</UL>\n");
 freeHash(&seqHash);
 
 char *sort = cartUsualString(cart, "sort", pslSortList[0]);
 pslSortListByVar(&pslList, sort);
 
 if (showEvery)
     printf("<H3>Genomic Alignments</H3>");
 else
     printf("<H3>%s/Genomic Alignments</H3>", item);
+/* Hub track names have special characters replaced with underbar, but tdb->table does not. */
+char *aliTable = cloneString(tdb->table);
+if (isHubTrack(aliTable))
+    trackHubFixName(aliTable);
 if (showEvery || pslIsProtein(pslList))
-    printAlignmentsSimple(pslList, start, "htcBigPslAli", tdb->table, item);
+    printAlignmentsSimple(pslList, start, "htcBigPslAli", aliTable, item);
 else
     printAlignmentsExtra(pslList, start, "htcBigPslAli", "htcBigPslAliInWindow",
-        tdb->table, item);
+        aliTable, item);
+freeMem(aliTable);
 pslFreeList(&pslList);
 
 
 if (showEvery && sequencesFound > 0)
     {  
     printf("<BR>\n");
     printf("Input Sequences:<BR>\n");
     printf("<textarea rows='8' cols='60' readonly>\n");
     printf("%s", sequencesText->string);
     printf("</textarea>\n");
     dyStringFree(&sequencesText);
     }
 
 printItemDetailsHtml(tdb, item);
 }