]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.share.js
GraphHopper directions updates
[rails.git] / app / assets / javascripts / leaflet.share.js
index 6a4491c2a7e57fcbf6158603bf8779dfd8990f70..44d02c0973f30f92766babce8a5c02090ba05cb2 100644 (file)
@@ -230,6 +230,7 @@ L.OSM.share = function (options) {
 
       update();
       options.sidebar.togglePane($ui, button);
+      $('.leaflet-control .control-button').tooltip('hide');
     }
 
     function toggleMarker() {
@@ -273,6 +274,19 @@ L.OSM.share = function (options) {
       update();
     }
 
+    function escapeHTML(string) {
+      var htmlEscapes = {
+        '&': '&',
+        '<': '&lt;',
+        '>': '&gt;',
+        '"': '&quot;',
+        "'": '&#x27;'
+      };
+      return string === null ? '' : (string + '').replace(/[&<>"']/g, function(match) {
+        return htmlEscapes[match];
+      });
+    }
+
     function update() {
       var bounds = map.getBounds();