From f0468c3c5ad6adcaba022ab5b989a4792706e135 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Sat, 25 Feb 2012 17:20:48 +0100 Subject: fix url for josm --- taginfo-config-example.json | 3 ++- web/lib/utils.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/taginfo-config-example.json b/taginfo-config-example.json index 51e923e..bd8e978 100644 --- a/taginfo-config-example.json +++ b/taginfo-config-example.json @@ -32,7 +32,8 @@ "max_results": 1000, // URL prefix for the XAPI/JOSM links on the key and tag pages. // "url_prefix": "http://www.informationfreeway.org/api/0.6/" - "url_prefix": "http://open.mapquestapi.com/xapi/api/0.6/" + // "url_prefix": "http://open.mapquestapi.com/xapi/api/0.6/" + "url_prefix": "http://overpass-api.de/api/xapi_meta?" }, "opensearch": { // For the OpenSearchDescription. You have to change at least the shortname and the contact for your instance. diff --git a/web/lib/utils.rb b/web/lib/utils.rb index c384940..01aedbe 100644 --- a/web/lib/utils.rb +++ b/web/lib/utils.rb @@ -67,7 +67,7 @@ def xapi_link(element, key, value=nil) end def josm_link(element, key, value=nil) - '' + external_link('josm_button', 'JOSM', 'http://localhost:8111/import?url=' + xapi_url(element, key, value), true) + '' + '' + external_link('josm_button', 'JOSM', 'http://localhost:8111/import?url=' + Rack::Utils::escape(xapi_url(element, key, value)), true) + '' end def external_link(id, title, link, new_window=false) -- cgit v1.2.3