019341f44cfc8fe9619366bff4d04e15233dd6a8 chmalee Fri Apr 18 16:17:45 2025 -0700 Fix invalid tag in filterBy <select> html. Select can only contain option, optgroup, or hr children, so stuffing a br in there like we were doing was throwing off later dropdownchecklist code that relies on the first child to be an option or optgroup. But only in Chrome as Chrome is more lenient and tolerates invalid tags in selects, refs #35529 diff --git src/hg/lib/hui.c src/hg/lib/hui.c index b0a97832a06..d053ae2d17d 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -4398,33 +4398,33 @@ cgiMakeRadioButton(cartSettingString, FILTERBY_MULTIPLE_LIST_OR, sameString(setting, FILTERBY_MULTIPLE_LIST_OR)); printf(" one or more match</b></div> "); } } puts("</td>"); } puts("</tr><tr>"); int ix=0; for (filterBy = filterBySet; filterBy != NULL; filterBy = filterBy->next, ix++) { char *setting = getFilterType(cart, tdb, filterBy->column, FILTERBY_DEFAULT); puts("<td>"); // value is always "All", even if label is different, to simplify javascript code int valIx = 1; if (filterByColumnIsMultiple(cart, tdb, setting)) - printf( "<SELECT id='%s%d' name='%s' multiple style='display: none; font-size:.9em;' class='filterBy'><BR>\n", selectIdPrefix,ix,filterBy->htmlName); + printf( "<SELECT id='%s%d' name='%s' multiple style='display: none; font-size:.9em;' class='filterBy'>\n", selectIdPrefix,ix,filterBy->htmlName); else - printf( "<SELECT id='%s%d' name='%s' style='font-size:.9em;'<BR>\n", selectIdPrefix,ix,filterBy->htmlName); + printf( "<SELECT id='%s%d' name='%s' style='font-size:.9em;'>\n", selectIdPrefix,ix,filterBy->htmlName); printf("<OPTION%s value=\"All\">%s</OPTION>\n", (filterByAllChosen(filterBy)?" SELECTED":""), allLabel); struct slName *slValue; for (slValue=filterBy->slValues;slValue!=NULL;slValue=slValue->next,valIx++) { char varName[32]; char *label = NULL; char *name = NULL; if (filterBy->useIndex) { safef(varName, sizeof(varName), "%d",valIx); name = varName; label = slValue->name; }