Permalink
Browse files

Simplify regexp

  • Loading branch information...
1 parent 5fcbb94 commit bea34a77296204d0fe328f4bcaed5a82335cbaf5 @pixeltrix pixeltrix committed Feb 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/middleware/static.rb
@@ -38,7 +38,7 @@ def unescape_path(path)
end
def escape_glob_chars(path)
- path.gsub(/(\*|\?|\[|\]|\{|\})/, "\\\\\\1")
+ path.gsub(/[*?{}\[\]]/, "\\\\\\&")
end
end

0 comments on commit bea34a7

Please sign in to comment.