From: Paweł Paprota Date: Fri, 5 Oct 2012 18:38:46 +0000 (+0200) Subject: Match wikipedia language prefixes case insensitively X-Git-Tag: live~5271 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/067ff205044892af626d117313b42e9b5f703789 Match wikipedia language prefixes case insensitively Without this values like "PL:Article" are linked to the English Wikipedia. --- diff --git a/app/helpers/browse_helper.rb b/app/helpers/browse_helper.rb index ea17b8202..c4e4d425a 100644 --- a/app/helpers/browse_helper.rb +++ b/app/helpers/browse_helper.rb @@ -97,7 +97,7 @@ private if key == "wikipedia" # This regex should match Wikipedia language codes, everything # from de to zh-classical - if value =~ /^([a-z-]{2,12}):(.+)$/ + if value =~ /^([a-z-]{2,12}):(.+)$/i # Value is : so split it up # Note that value is always left as-is, see: https://trac.openstreetmap.org/ticket/4315 lang = $1