7f929d20e51082fbefad6f1a482d600f3ec68ce7
braney
  Mon Nov 13 10:14:36 2017 -0800
replace en-dash and em-dash with hyphen in hgGateway and hgTracks

diff --git src/hg/js/autocomplete.js src/hg/js/autocomplete.js
index a34c774..5a7ea93 100644
--- src/hg/js/autocomplete.js
+++ src/hg/js/autocomplete.js
@@ -110,30 +110,32 @@
                 }
             });
         }
 
         // I want to set focus to the suggest element, but unforunately that prevents PgUp/PgDn from
         // working, which is a major annoyance.
         // $('#positionInput').focus();
         $("#positionInput").change(function(event) {
             if (!lastSelected || lastSelected !== $('#positionInput').val()) {
                 // This handles case where user typed or edited something rather than choosing from a suggest list;
                 // in this case, we only change the position hidden; we do NOT update the displayed coordinates.
                 var val = $('#positionInput').val();
                 // handles case where users zeroes out positionInput; in that case we revert to currently displayed position
                 if (!val || val.length === 0 || val === waterMark)
                     val = $('#positionDisplay').text();
+                else
+                    val = val.replace(/\u2013|\u2014/g, "-");  // replace en-dash and em-dash with hyphen
                 $('#position').val(val);
                 suggestBox.clearFindMatches();
             }
         });
         $("#positionDisplay").click(function(event) {
             // this let's the user click on the genomic position (e.g. if they want to edit it)
             clickCallback($(this).text());
             $('#positionInput').val($(this).text());
             suggestBox.clearFindMatches();
             if (hgTracks.windows)
                 {
                 genomePos.positionDisplayDialog();
                 }
         });
     }