Skip to content
Browse files

Simplify regexp

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

0 comments on commit b9ad097

Please sign in to comment.
Something went wrong with that request. Please try again.