9be895864ea582e182ee6bd0d9f1f72b873ef43b braney Wed Aug 1 14:39:04 2018 -0700 deal with single quotes in hub names in hgCollection. #21837 diff --git src/hg/hgCollection/hgCollection.c src/hg/hgCollection/hgCollection.c index 1960bdb..a3556a4 100644 --- src/hg/hgCollection/hgCollection.c +++ src/hg/hgCollection/hgCollection.c @@ -465,31 +465,31 @@ else jsInlineF("collectionData['#'] = [];"); jsInlineF("%s", dyNames->string); jsInlineF("%s", dyLabels->string); jsInlineF("var trackData = []; "); struct dyString *rootChildren = newDyString(512); addVisibleTracks(groupHash, rootChildren, cart, trackList); for(curGroup = groupList; curGroup; curGroup = curGroup->next) { if ((hubName != NULL) && sameString(curGroup->name, hubName)) continue; if (!isEmpty(rootChildren->string)) dyStringPrintf(rootChildren, ","); - dyStringPrintf(rootChildren, "{icon:'../images/folderC.png',id:'%s', text:'%s', parent:'#', children:true,li_attr:{title:'%s'}}", curGroup->name, curGroup->label, FOLDER_TITLE); + dyStringPrintf(rootChildren, "{icon:'../images/folderC.png',id:'%s', text:'%s', parent:'#', children:true,li_attr:{title:'%s'}}", curGroup->name, escapeLabel(curGroup->label), FOLDER_TITLE); struct trackDb *tdb; jsInlineF("trackData['%s'] = [", curGroup->name); boolean first = TRUE; for(tdb = trackList; tdb; tdb = tdb->next) { if ( sameString(tdb->grp, curGroup->name)) { if (!first) jsInlineF(","); trackToClient(curGroup->name, tdb, FALSE); first = FALSE; } } jsInlineF("];"); for(tdb = trackList; tdb; tdb = tdb->next)