0c56fe6958f347b5ab7070725114c7d4c216bc87
braney
  Mon Nov 13 15:19:40 2017 -0800
catch weird strings in position boxes

diff --git src/hg/hgTables/hgTables.c src/hg/hgTables/hgTables.c
index d3c7dbf..cae87e8 100644
--- src/hg/hgTables/hgTables.c
+++ src/hg/hgTables/hgTables.c
@@ -27,30 +27,31 @@
 #include "hgFind.h"
 #include "hgTables.h"
 #include "joiner.h"
 #include "bedCart.h"
 #include "hgMaf.h"
 #include "gvUi.h"
 #include "wikiTrack.h"
 #include "trackHub.h"
 #include "hubConnect.h"
 #include "hgConfig.h"
 #include "udc.h"
 #include "chromInfo.h"
 #include "knetUdc.h"
 #include "trashDir.h"
 #include "genbank.h"
+#include "windowsToAscii.h"
 
 void usage()
 /* Explain usage and exit. */
 {
 errAbort(
   "hgTables - Get table data associated with tracks and intersect tracks\n"
   "usage:\n"
   "   hgTables XXX\n"
   "options:\n"
   "   -xxx=XXX\n"
   );
 }
 
 /* Global variables. */
 struct cart *cart;	/* This holds cgi and other variables between clicks. */
@@ -395,31 +396,31 @@
     return TRUE;
     }
 else if (region->start == 0)	/* Confusing way findGenomePosWeb says pos not found. */
     {
     cartSetString(cart, hgtaRange, hDefaultPos(database));
     return FALSE;
     }
 else
     return FALSE;
 }
 
 boolean lookupPosition()
 /* Look up position (aka range) if need be.  Return FALSE if it puts
  * up multiple positions. */
 {
-char *range = cartUsualString(cart, hgtaRange, "");
+char *range = windowsToAscii(cloneString(cartUsualString(cart, hgtaRange, "")));
 boolean isSingle = TRUE;
 range = trimSpaces(range);
 if (range[0] != 0)
     {
     struct region r;
     isSingle = searchPosition(range, &r);
     if (!isSingle)
 	{
 	// In case user manually edits the browser location as described in #13009,
 	// revert the position.  If they instead choose from the list as we expect,
 	// that will set the position to their choice.
 	char *lastPosition = cartUsualString(cart, "lastPosition", hDefaultPos(database));
 	cartSetString(cart, "position", lastPosition);
 	}
     }