Skip to content
instance method

CGI::Escape#unescapeURIComponent

(::string) -> ::String
unescapeURIComponent(string, encoding = @@accept_charset)

URL-decode a string following RFC 3986 with encoding(optional).

Example
string = CGI.unescapeURIComponent("%27Stop%21%27+said%20Fred")
   # => "'Stop!'+said Fred"
See also #unescape_uri_component #unescapeHTML also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1