aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhellekin <how@cepheide.org>2024-03-17 12:50:49 +0100
committerhellekin <how@cepheide.org>2024-03-17 12:50:49 +0100
commitf6f88b65f153457214a1e4dc13bcdae48d98e00c (patch)
treed8cf0d9cdace05b577ddab64819636f22bd1fa31
parentee882dbc322a5c713895a011f91579857853c336 (diff)
downloaddiscourse-umap-f6f88b65f153457214a1e4dc13bcdae48d98e00c.tar.gz
Handle #
-rw-r--r--plugin.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin.rb b/plugin.rb
index 75db791..eaad5f3 100644
--- a/plugin.rb
+++ b/plugin.rb
@@ -11,14 +11,14 @@ class Onebox::Engine::OpenStreetMapOnebox
@@width = 425
@@height = 350
@@tile_size = 256
- @@REGEX = /^https?:\/\/umap\.openstreetmap\.fr\/fr\/map\/(.*)#([\d\.]+)\/([-\d\.]+)\/([-\d\.]+)/
+ @@REGEX = /^https?:\/\/umap\.openstreetmap\.fr\/fr\/map\/(.*)\#([\d\.]+)\/([-\d\.]+)\/([-\d\.]+)/
# enable oneboxing permalinks (http://wiki.openstreetmap.org/wiki/Permalink) into iframes
matches_regexp(@@REGEX)
def to_html
map_name, zoom, lat, lon = @url.match(@@REGEX).captures
- iframe_url = "//umap.openstreetmap.fr/fr/map/#{map_name}##{zoom.to_i}/#{lat.to_f}/#{lon.to_f}"
+ iframe_url = "//umap.openstreetmap.fr/fr/map/#{map_name}\##{zoom.to_i}/#{lat.to_f}/#{lon.to_f}"
if marker = @url.match(/mlat=([-\d\.]+).+mlon=([-\d\.]+)/)
mlat, mlon = marker.captures