3f1b7b784bc29576d0661e0041f3167c3cbe3483 max Mon Jun 22 03:05:26 2020 -0700 allowing extra fields refered in urls tdb statement to be full URLs without a label, no redmine yet, email from Chris Lee to browser-staff diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index c4926cf..600ac76 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -1451,30 +1451,32 @@ if (id < nameCount) itemName = idNames[sqlUnsigned(itemName)]; } // a | character can optionally be used to separate the ID used for $$ from the name shown in the link (like in Wikimedia markup) char *idForUrl = itemName; boolean encode = TRUE; if (strstr(itemName, "|")) { char *parts[2]; chopString(itemName, "|", parts, ArraySize(parts)); idForUrl = parts[0]; itemName = parts[1]; encode = FALSE; // assume the link is already encoded } + if (startsWith("http", itemName)) // the ID may be a full URL already, encoding would destroy it + encode = FALSE; char *idUrl = replaceInUrl(url, idForUrl, cart, database, seqName, winStart, winEnd, tdb->track, encode, NULL); printf("<a href=\"%s\" target=\"_blank\">%s</a>", idUrl, itemName); } printf("</td></tr>\n"); freeMem(slIds); //freeMem(idNames); } int extraFieldsStart(struct trackDb *tdb, int fieldCount, struct asObject *as) /* return the index of the first extra field */ { int start = 0; char *type = cloneString(tdb->type);