X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b40353b9b05350bccac09e136315f2fcb0093ca7..d28ae2ad0ab336a5c1f1b7152945b30a4e2cfd02:/app/helpers/browse_helper.rb diff --git a/app/helpers/browse_helper.rb b/app/helpers/browse_helper.rb index a2d0e440d..5d0a18fd9 100644 --- a/app/helpers/browse_helper.rb +++ b/app/helpers/browse_helper.rb @@ -140,7 +140,7 @@ module BrowseHelper # Must break it up to correctly build the url value = $1 section = "#" + $2 - encoded_section = "#" + URI.encode($2.gsub(" ", "_")).gsub("%3A", ":").gsub("%", ".") + encoded_section = "#" + URI.encode($2.gsub(/ +/, "_"), /[^A-Za-z0-9:_]/).gsub("%", ".") else section = "" encoded_section = ""