]> git.openstreetmap.org Git - rails.git/blobdiff - vendor/plugins/http_accept_language/lib/http_accept_language.rb
Remove comment saying when these files were generated
[rails.git] / vendor / plugins / http_accept_language / lib / http_accept_language.rb
index 1bedd6c742ff28e9793576688bd8a05aefe15185..1266a3e645560b26bec1f3a7faba4f5479dddf21 100644 (file)
@@ -49,7 +49,7 @@ module HttpAcceptLanguage
   def compatible_language_from(array)
     user_preferred_languages.map do |x|
       array.find do |y|
-        y.to_s =~ /^#{x.to_s}(-|$)/
+        y.to_s =~ /^#{Regexp.escape(x.to_s)}(-|$)/
       end
     end.compact.first
   end