Skip to content
This repository has been archived by the owner on Feb 14, 2019. It is now read-only.

Commit

Permalink
Regex.escape Mime.EXTENSION_LOOKUP.keys
Browse files Browse the repository at this point in the history
  • Loading branch information
David Debreczeni committed Aug 3, 2012
1 parent ada98cd commit 99f41d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/routing_filter/filters/extension.rb
Expand Up @@ -64,7 +64,7 @@ def excluded?(url)
end

def mime_extension?(url)
url =~ /\.#{Mime::EXTENSION_LOOKUP.keys.join('|')}(\?|$)/
url =~ /\.#{Mime::EXTENSION_LOOKUP.keys.map { |ext| Regexp.escape(ext) }.join('|')}(\?|$)/
end
end
end

0 comments on commit 99f41d7

Please sign in to comment.