4dfe3060fbc9ce3605ef2bb73ef775cff1813313 galt Mon Feb 5 13:35:49 2018 -0800 Adding some needed url-encoding to chromInfoPage links diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index fb05ce6..b95e83d 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -9446,31 +9446,31 @@ struct slName *chromPtr = NULL; long long total = 0; if (sameString(sortType,"default")) slSort(&chromList, chrSlNameCmp); else if (sameString(sortType,"withAltRandom")) slSort(&chromList, chrSlNameCmpWithAltRandom); else errAbort("unknown sort type in chromInfoRowsChromExt: %s", sortType); for (chromPtr = chromList; chromPtr != NULL; chromPtr = chromPtr->next) { unsigned size = hChromSize(database, chromPtr->name); cgiSimpleTableRowStart(); cgiSimpleTableFieldStart(); - printf("<A HREF=\"%s?%s=%s&position=%s\">%s</A>", + htmlPrintf("<A HREF=\"%s|none|?%s|url|=%s|url|&position=%s|url|\">%s</A>", hgTracksName(), cartSessionVarName(), cartSessionId(cart), chromPtr->name, chromPtr->name); cgiTableFieldEnd(); cgiTableFieldStartAlignRight(); printLongWithCommas(stdout, size); puts(" "); cgiTableFieldEnd(); cgiTableRowEnd(); total += size; } chromInfoTotalRow(slCount(chromList), total); slFreeList(&chromList); } void chromInfoRowsChrom() @@ -9495,31 +9495,31 @@ struct chromInfo *chromInfo = trackHubAllChromInfo(database); slSort(&chromInfo, chromInfoCmpSize); int seqCount = slCount(chromInfo); long long total = 0; char msg1[512], msg2[512]; boolean truncating; int count = limit; truncating = (limit > 0) && (seqCount > limit); for(;count-- && (chromInfo != NULL); chromInfo = chromInfo->next) { unsigned size = chromInfo->size; cgiSimpleTableRowStart(); cgiSimpleTableFieldStart(); - printf("<A HREF=\"%s?%s=%s&position=%s\">%s</A>", + htmlPrintf("<A HREF=\"%s|none|?%s|url|=%s|url|&position=%s|url|\">%s</A>", hgTracksName(), cartSessionVarName(), cartSessionId(cart), chromInfo->chrom,chromInfo->chrom); cgiTableFieldEnd(); cgiTableFieldStartAlignRight(); printLongWithCommas(stdout, size); puts(" "); cgiTableFieldEnd(); cgiTableRowEnd(); total += size; } if (!truncating) { chromInfoTotalRow(seqCount, total); } else @@ -9585,31 +9585,31 @@ { sr = sqlGetResult(conn, NOSQLINJ "select chrom,size from chromInfo order by size desc"); } else { sqlSafef(query, sizeof(query), "select chrom,size from chromInfo order by size desc limit %d", limit); sr = sqlGetResult(conn, query); } while ((row = sqlNextRow(sr)) != NULL) { unsigned size = sqlUnsigned(row[1]); cgiSimpleTableRowStart(); cgiSimpleTableFieldStart(); - printf("<A HREF=\"%s?%s=%s&position=%s\">%s</A>", + htmlPrintf("<A HREF=\"%s|none|?%s|url|=%s|url|&position=%s|url|\">%s</A>", hgTracksName(), cartSessionVarName(), cartSessionId(cart), row[0], row[0]); cgiTableFieldEnd(); cgiTableFieldStartAlignRight(); printLongWithCommas(stdout, size); puts(" "); cgiTableFieldEnd(); cgiTableRowEnd(); total += size; } if (!truncating) { chromInfoTotalRow(seqCount, total); } else