2ce88ebc060c34b561bc5d193a20d4cf628f9350
braney
  Thu May 15 10:57:19 2014 -0700
fix pennantIcon code to reflect the documentation.
diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index ecc2f96..be11317 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -7820,51 +7820,61 @@
     }
 sqlFreeResult(&sr);
 webPrintLinkTableEnd();
 printf("Total: %d\n", count);
 }
 
 boolean printPennantIconNote(struct trackDb *tdb)
 // Returns TRUE and prints out the "pennantIcon" and note when found.
 //This is used by hgTrackUi and hgc before printing out trackDb "html"
 {
 char * setting = trackDbSetting(tdb, "pennantIcon");
 if (setting != NULL)
     {
     setting = cloneString(setting);
     char *icon = htmlEncodeText(nextWord(&setting),FALSE);
-    char *url = nextWord(&setting);
-    char *hint = htmlEncodeText(stripEnclosingDoubleQuotes(setting),FALSE);
+    char *url = NULL;
+    if (setting != NULL)
+	url = nextWord(&setting);
+    char *hint = NULL;
+    if (setting != NULL)
+	hint = htmlEncodeText(stripEnclosingDoubleQuotes(setting),FALSE);
 
-    if (strlen(url) > 0)
+    if (!isEmpty(url))
+        {
+	if (isEmpty(hint))
+	    printf("<P><a href='%s' TARGET=ucscHelp><img height='16' width='16' "
+		   "src='../images/%s'></a>",url,icon);
+	else
 	    {
 	    printf("<P><a title='%s' href='%s' TARGET=ucscHelp><img height='16' width='16' "
 		   "src='../images/%s'></a>",hint,url,icon);
 
 	    // Special case for liftOver from hg17 or hg18, but this should probably be generalized.
 	    if (sameString(icon,"18.jpg") && startsWithWord("lifted",hint))
 		printf("&nbsp;Note: these data have been converted via liftOver from the Mar. 2006 "
 		       "(NCBI36/hg18) version of the track.");
 	    else if (sameString(icon,"17.jpg") && startsWithWord("lifted",hint))
 		printf("&nbsp;Note: these data have been converted via liftOver from the May 2004 "
 		       "(NCBI35/hg17) version of the track.");
-        else if (strlen(hint) > 0)
+	    else 
 		printf("&nbsp;Note: %s.",hint);
 	    printf("</P>\n");
 	    }
+	}
     else
-        printf("<img height='16' width='16' src='%s'>\n",icon);
+        printf("<BR><img height='16' width='16' src='../images/%s'>\n",icon);
     return TRUE;
     }
 return FALSE;
 }
 
 boolean hPrintPennantIcon(struct trackDb *tdb)
 // Returns TRUE and prints out the "pennantIcon" when found.
 // Example: ENCODE tracks in hgTracks config list.
 {
 char *setting = trackDbSetting(tdb, "pennantIcon");
 if (setting != NULL)
     {
     setting = cloneString(setting);
     char *icon = htmlEncodeText(nextWord(&setting),FALSE);
     if (setting)