Method: HTTP::Message.unescape
- Defined in:
- lib/httpclient/http.rb
.unescape(string) ⇒ Object
from CGI.unescape
924 925 926 927 928 |
# File 'lib/httpclient/http.rb', line 924 def unescape(string) string.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/n) do [$1.delete('%')].pack('H*') end end |