X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/061c53ff1d0f9ddacdc02a3396a4c857b71a502f..f9109b7a75f91c208a7b5f68cc64ba253a9041c5:/app/helpers/browse_tags_helper.rb diff --git a/app/helpers/browse_tags_helper.rb b/app/helpers/browse_tags_helper.rb index 7c43511c4..90e75e90a 100644 --- a/app/helpers/browse_tags_helper.rb +++ b/app/helpers/browse_tags_helper.rb @@ -120,7 +120,7 @@ module BrowseTagsHelper # # Also accepting / as a visual separator although not given in RFC 3966, # because it is used as a visual separator in OSM data in some countries. - if value =~ %r{^\s*\+[\d\s\(\)/\.-]{6,25}\s*(;\s*\+[\d\s\(\)/\.-]{6,25}\s*)*$} + if value.match?(%r{^\s*\+[\d\s\(\)/\.-]{6,25}\s*(;\s*\+[\d\s\(\)/\.-]{6,25}\s*)*$}) return value.split(";").map do |phone_number| # for display, remove leading and trailing whitespace phone_number = phone_number.strip