instance method
unescape
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v6.1.7.10Signature
unescape(str, escaped = @regexp[:ESCAPED])
No documentation comment.
Parameters
-
strreq -
escapedopt = @regexp[:ESCAPED]
Source
# File activesupport/lib/active_support/core_ext/uri.rb, line 10
def unescape(str, escaped = @regexp[:ESCAPED])
enc = (str.encoding == Encoding::US_ASCII) ? Encoding::UTF_8 : str.encoding
str.gsub(escaped) { [$&[1, 2].hex].pack('C') }.force_encoding(enc)
end
Defined in activesupport/lib/active_support/core_ext/uri.rb line 10
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Object