instance method
escape_glob_chars
Ruby on Rails 3.2.22.5
Since v3.1.12 Last seen in v4.1.16Signature
escape_glob_chars(path)
No documentation comment.
Parameters
-
pathreq
Source
# File actionpack/lib/action_dispatch/middleware/static.rb, line 41
def escape_glob_chars(path)
path.force_encoding('binary') if path.respond_to? :force_encoding
path.gsub(/[*?{}\[\]\\]/, "\\\\\\&")
end
Defined in actionpack/lib/action_dispatch/middleware/static.rb line 41
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::FileHandler