X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8e404f3a468a2636481d52f245b816c41e9d5ac0..fe77d0daa1047767e374494063073d46a059f0b2:/app/helpers/browse_helper.rb diff --git a/app/helpers/browse_helper.rb b/app/helpers/browse_helper.rb index 793baf07b..7ccfca334 100644 --- a/app/helpers/browse_helper.rb +++ b/app/helpers/browse_helper.rb @@ -160,7 +160,7 @@ module BrowseHelper def telephone_link(_key, value) # does it look like a phone number? eg "+1 (234) 567-8901 " ? - return nil unless value =~ /^\s*\+[\d\s\(\)\/\.-]{6,25}\s*$/ + return nil unless value =~ %r{^\s*\+[\d\s\(\)/\.-]{6,25}\s*$} # remove all whitespace instead of encoding it http://tools.ietf.org/html/rfc3966#section-5.1.1 # "+1 (234) 567-8901 " -> "+1(234)567-8901"