Convert htmlspecial characters using ruby

hi,

I have to decode the html special character using ruby,
if any function is there like php htmlspecialchars_decode ().

thanks,
sangeetha.S

On 7/11/07, geetha [email protected] wrote:

hi,

I have to decode the html special character using ruby,
if any function is there like php htmlspecialchars_decode ().

thanks,
sangeetha.S

If you want to escape HTML special charcaters then i guess following
would work:

CGI::escapeHTML(‘Usage: foo “bar” ’)
# => “Usage: foo "bar" <baz>”

If thats not what you want, please look into documentation of CGI
class and i think you would find method that you are looking for.

On Wednesday 11 July 2007 09:06, hemant wrote:

If you want to escape HTML special charcaters then i guess following would
work:

CGI::escapeHTML('Usage: foo “bar” ')
# => “Usage: foo “bar” <baz>”

If thats not what you want, please look into documentation of CGI
class and i think you would find method that you are looking for.
also ERB::h might help ^^