From: Emmanuel Oga Date: 2008-08-18T21:32:40+09:00 Subject: Re: unescaping html Vivek wrote: > Hi, > Is there a method or any library which allows me to unescape encoded > html. For example If I have hi%5Bthere%5D > I should get hi[there] > > vivek encoded _HTML_ ? what you will need is hpricot (which is amazing :-) require 'rubygems' require 'hpricot' Hpricot("hi>there<", :xhtml_strict => true).to_plain_text # => "hi>there<" But! from your example seems like you don't want to unescape html but the url: require 'cgi' CGI.unescape "hi%5Bthere%5D" => "hi[there]" Greets! -- Posted via http://www.ruby-forum.com/.