X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8197ab3f82f343dd305b817e7676647354d0aea5..90d2ed759fe2289cea3ed0d3d422881e65249275:/app/helpers/browse_helper.rb diff --git a/app/helpers/browse_helper.rb b/app/helpers/browse_helper.rb index d2c2b5807..ff702aed1 100644 --- a/app/helpers/browse_helper.rb +++ b/app/helpers/browse_helper.rb @@ -49,6 +49,9 @@ private end def wikipedia_link(key, value) + # Some k/v's are wikipedia=http://en.wikipedia.org/wiki/Full%20URL + return nil if value =~ /^http:\/\// + if key == "wikipedia" # This regex should match Wikipedia language codes, everything # from de to zh-classical @@ -68,9 +71,6 @@ private return nil end - # Some k/v's are wikipedia=http://en.wikipedia.org/wiki/Full%20URL - return nil if value =~ /^http:\/\// - return { :url => "http://#{lang}.wikipedia.org/wiki/#{value}?uselang=#{I18n.locale}", :title => value