From: John Firebaugh Date: Tue, 8 Oct 2013 23:52:53 +0000 (-0700) Subject: Don't try to route external URLs X-Git-Tag: live~4609^2~209 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/4cf32e0f0043ad73bf8ecd5320ce1ab55e81e386 Don't try to route external URLs --- diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index ef23e340d..77b247c10 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -293,7 +293,7 @@ $(document).ready(function () { $(document).on("click", "a", function(e) { if (e.isPropagationStopped()) return; - if (OSM.route(this.pathname + this.search + this.hash)) e.preventDefault(); + if (this.host === window.location.host && OSM.route(this.pathname + this.search + this.hash)) e.preventDefault(); }); $("#search_form").on("submit", function(e) {