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