be4311c07e14feb728abc6425ee606ffaa611a58 markd Fri Jan 22 06:46:58 2021 -0800 merge with master diff --git src/hg/hgTracks/imageV2.c src/hg/hgTracks/imageV2.c index f187893..8d251cb 100644 --- src/hg/hgTracks/imageV2.c +++ src/hg/hgTracks/imageV2.c @@ -1785,31 +1785,37 @@ } else if (item->linkVar != NULL) { if (skipToSpaces(item->linkVar)) hPrintf(" HREF=%s",item->linkVar); else if (startsWith("/cgi-bin/hgGene", item->linkVar)) // redmine #4151 hPrintf(" HREF='..%s'",item->linkVar); // FIXME: Chin should get rid else // of this special case! hPrintf(" HREF='%s'",item->linkVar); hPrintf(" class='area'"); } else warn("map item has no url!"); if (item->title != NULL && strlen(item->title) > 0) - hPrintf(" TITLE='%s'", attributeEncode(item->title) ); + { + // for TITLEs, which we use for mouseOvers, since they can't have HTML in + // them, we substitute a unicode new line for
after we've encoded it. + // This is stop-gap until we start doing mouseOvers entirely in Javascript + char *encodedString = attributeEncode(item->title); + hPrintf(" TITLE='%s'", replaceChars(encodedString,"<br>", "
")); + } if (item->id != NULL) hPrintf(" id='%s'", item->id); hPrintf(">" ); } hPrintf("\n"); return TRUE; } static void imageDraw(struct imgBox *imgBox,struct imgTrack *imgTrack,struct imgSlice *slice, char *name,int offsetX,int offsetY,boolean useMap) // writes an image as HTML { if (slice->parentImg && slice->parentImg->file != NULL) { hPrintf("