method
escape_glob_chars
v3.2.8 -
Show latest stable
- Class:
ActionDispatch::FileHandler
escape_glob_chars(path)public
No documentation available.
# File actionpack/lib/action_dispatch/middleware/static.rb, line 40
def escape_glob_chars(path)
path.force_encoding('binary') if path.respond_to? :force_encoding
path.gsub(/[*?{}\[\]]/, "\\\\\\&")
end