c0af5f216f8ff00466f0d222cede7f491fd17d81
galt
  Fri Jan 20 23:09:35 2023 -0800
More fixes for stuff found by htmlCheck, refs #7914

diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c
index 411f672..28ff217 100644
--- src/hg/hgHubConnect/hgHubConnect.c
+++ src/hg/hgHubConnect/hgHubConnect.c
@@ -270,38 +270,38 @@
         "<a href=\"/cgi-bin/hgSession\" style='color:#121E9A' target=_blank>My Sessions</a> (<b>My Data</b> > <b>My Sessions</b>). "
         "The resulting stable link can be added to publications and shared freely. You, as the author, "
         "also have the power to update the session contents freely. "
         "Alternatively, you may <a href=\"/goldenPath/help/hgTrackHubHelp.html#Sharing\" "
         "style='color:#121E9A' target=_blank>build a link with the hub URL</a> to allow users to retain their browser "
         "configuration, connected hubs, and custom tracks.</p>"
         "</p>"
         "<p>See our <a href=\"/goldenPath/help/publicHubGuidelines.html\" style='color:#121E9A'>public "
         "hub guidelines</A> for information on submitting a new public hub.</p>\n"
         );
 
 if (unlistedHubCount == 0)
     {
     // nothing to see here
     printf("<tr><td style='text-align:left'>No connected track or assembly hubs.<p>To connect a hub:"
-            "<li>Enter its URL into the input box above and click 'Add Hub'. "
+            "<ul><li>Enter its URL into the input box above and click 'Add Hub'. </li>"
             "<li>Alternatively, you can go to the 'Public Hubs' tab on this page and connect one "
-            "of the hubs that were submitted to us. "
-            "<li>Another way to connect to hubs is via a direct connection link copied using the copy icon, shown on this page, when a hub is connected. "
+            "of the hubs that were submitted to us. </li>"
+            "<li>Another way to connect to hubs is via a direct connection link copied using the copy icon, shown on this page, when a hub is connected. </li>"
             "<li>You can also connect to hub by following a short link to a saved session, created though the menu "
-            "'My Data &gt; My Sessions', if the Genome Browser had connected hubs when the session was saved."
+            "'My Data &gt; My Sessions', if the Genome Browser had connected hubs when the session was saved.</li>"
             "</ul></td></tr>");
-    printf("</thead></table>");
+    printf("</thead></table>\n");
     puts("</FORM>");      // return from within DIV and FROM is probably not a good idea
     puts("</div></div>"); // tabSection and .unlistedHubs
     return;
     }
 
 // time to output the big table.  First the header
 puts(
     "<tr> "
 	"<th>Display</th> "
 	"<th>Hub Name</th> "
 	"<th>Description</th> "
 	"<th>Assemblies<span class='assemblyClickNote'>Click to connect and browse directly. Click copy icon to copy URL to clipboard for sharing.</span></th> "
     "</tr>\n"
     "</thead>\n");
 
@@ -489,32 +489,33 @@
 char *timeLabel = "Show timings";
 char *timeVal = "on";
 char *timeDesc = "Show no timing measurements.";
 char *timeStatus = "OFF";
 if (cartNonemptyString(cart, "measureTiming")) 
     {
         timeLabel = "Hide timings";
         timeVal = "";
         timeDesc = "Shows loading time in milliseconds for each track, to help debug performance problems.";
         timeStatus = "ON";
     }
 
 printf("<b style='font-size:90%%'>Show load times: %s</b> &nbsp;", timeStatus);
 printf("<button type='submit' name='measureTiming' value='%s'>Change to: %s</button>", timeVal, timeLabel);
 
-printf("<div class='help'>Current setting: %s</div>", timeDesc);
+printf("<div class='help'>Current setting: %s</div>\n", timeDesc);
 
+puts("</FORM>");
 puts("</div>"); // margin-left
 puts("</div>"); // tabSection
 puts("</div>"); // #hubDeveloper
 
 jsOnEventById("click", "hubValidateButton", "makeIframe(event)");
 }
 
 void printSearchAndFilterBoxes(int searchEnabled, char *hubSearchTerms, char *dbFilter)
 /* Create the text boxes for search and database filtering along with the required
  * javscript */
 {
 printf("<FORM ACTION=\"%s\" NAME=\"searchHubForm\">\n",  "../cgi-bin/hgHubConnect");
 if (searchEnabled)
     {
     cgiMakeHiddenVar(hgHubDoSearch, "on");
@@ -556,31 +557,37 @@
         "on an assembly or track line to open it in a new window.\n");
 puts("<BR><BR>\n");
 }
 
 
 void printHubListHeader()
 /* Write out the header for a list of hubs in its own table */
 {
 puts("<table id=\"publicHubsTable\" class=\"hubList\"> "
         "<thead><tr> "
             "<th>Display</th> "
             "<th>Hub Name</th> "
             "<th>Description</th> "
             //"<th>Assemblies</th> "
             "<th>Assemblies<span class='assemblyClickNote'>Click to connect and browse directly</span></th> "
-        "</tr></thead>");
+        "</tr></thead><tbody><tr><td>");
+}
+
+void printHubListFooter()
+/* Write out the header for a list of hubs in its own table */
+{
+puts("</td></tr></tbody></table>");
 }
 
 void outputPublicTableRow(struct hubEntry *hubInfo, int count)
 /* Prints out a table row with basic information about a hub and a button
  * to connect to that hub */
 {
 int id = hubInfo->id;
 char jsId[256];
 struct slName *dbListNames = slNameListFromComma(hubInfo->dbList);
 printf("<tr>\n");
 if (id != 0)
     {
     ourCellStart();
     char hubName[32];
     safef(hubName, sizeof(hubName), "%s%u", hgHubConnectHubVarPrefix, id);
@@ -1172,30 +1179,32 @@
     for (hubInfo = hubList; hubInfo != NULL; hubInfo = hubInfo->next)
         {
         struct hubSearchText *searchResult = NULL;
         if (searchResultHash != NULL)
             {
             searchResult = (struct hubSearchText *) hashMustFindVal(searchResultHash, hubInfo->hubUrl);
             }
         printOutputForHub(hubInfo, searchResult, count);
         count++;
         }
     printOutputForHubTime = clock1000();
     if (measureTiming)
         printf("hgHubConnect: printOutputForHubTime before js execution: %lu millis<BR>\n", printOutputForHubTime - slTime);
     if (searchResultHash == NULL)
         printf("</tbody></table>\n");
+
+    printHubListFooter();
     }
 if (hubsToPrint != NULL)
     {
     /* Write out the list of hubs in a single table inside a div that will be hidden by
      * javascript.  This table is used (before being hidden) to set common column widths for
      * the individual hub tables when they're split by detailed search results. */
     printf("<div id='hideThisDiv'>\n");
     printf("<table class='hubList' id='hideThisTable'><tbody>\n");
     for (hubInfo = hubList; hubInfo != NULL; hubInfo = hubInfo->next)
         {
         printOutputForHub(hubInfo, NULL, count);
         count++;
         }
     printf("</tbody></table>\n");
     printf("</div>\n");
@@ -1248,31 +1257,31 @@
 puts("<div id=\"publicHubs\" class=\"hubList\">");
 
 puts("<div class='tabSection' style='border-bottom:none'>");
 
 printf(
     "<P>"
     "Track data hubs are collections of external tracks that can be added to the UCSC Genome Browser. "
     "Click <B>Connect</B> to attach a hub and redirect to the assembly gateway page. "
     "Hub tracks will then show up in the hub's own blue bar track group under the browser graphic. "
     "For more information, including <A HREF=\"../goldenPath/help/hgTrackHubHelp#Hosting\" "
     "style='color:#121E9A' target=_blank>where to host your track hub</a>, see our "
     "<A HREF=\"../goldenPath/help/hgTrackHubHelp.html\" TARGET=_blank style='color:#121E9A'>"
     "User's Guide</A>. "
     "</P>"
     "<P>Track Hubs are created and maintained by external sources."
-    " UCSC is not responsible for their content.<BR></P>"
+    " UCSC is not responsible for their content.<BR></P>\n"
 );
 
 char *hubSearchTableName = hubSearchTextTableName();
 int searchEnabled = sqlTableExists(conn, hubSearchTableName);
 
 printSearchAndFilterBoxes(searchEnabled, hubSearchTerms, dbFilter);
 
 struct hash *searchResultHash = NULL;
 struct slName *hubsToPrint = NULL;
 if (searchEnabled && !isEmpty(hubSearchTerms))
     {
     printSearchTerms(hubSearchTerms);
     // Forcing checkDescriptions to TRUE right now, but we might want to add this as a
     // checkbox option for users in the near future.
     bool checkDescriptions = TRUE;