eccb628fa4570ccb38e65af2366d62c445dd6540
max
Wed Oct 9 15:26:00 2013 -0700
fixing problem when spaces where in the ID list, #10956
diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index 4fdcd46..bb48763 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -1505,31 +1505,33 @@
url = (char*)hashFindVal(fieldToUrl, col->name);
if (url==NULL)
{
printf("
%s | \n", idList);
return;
}
// split the id into parts and print each part as a link
struct slName *slIds = slNameListFromComma(idList);
struct slName *itemId = NULL;
printf("");
for (itemId = slIds; itemId!=NULL; itemId = itemId->next)
{
if (itemId!=slIds)
printf(", ");
- char *idUrl = replaceInUrl(tdb, url, itemId->name, TRUE);
+ char* itemName = itemId->name;
+ itemName = trimSpaces(itemName);
+ char *idUrl = replaceInUrl(tdb, url, itemName, TRUE);
printf("%s", idUrl, itemId->name);
}
printf(" | \n");
freeMem(slIds);
}
int extraFieldsPrint(struct trackDb *tdb,struct sqlResult *sr,char **fields,int fieldCount)
// Any extra bed or bigBed fields (defined in as and occurring after N in bed N + types.
// sr may be null for bigBeds.
// Returns number of extra fields actually printed.
{
struct sqlConnection *conn = NULL ;
if (!trackHubDatabase(database))
conn = hAllocConnTrack(database, tdb);
struct asObject *as = asForTdb(conn, tdb);