[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

library for doing html escaping...

Sean T Allen

4/29/2005 7:42:00 PM

ruby forge drives me crazy trying to find things...

need a library that provides simple functionality of take a string and
doing html escaping

" to "
& to &

etc.

suggestions....
2 Answers

Phlip

4/29/2005 7:48:00 PM

0

Sean T Allen wrote:

> ruby forge drives me crazy trying to find things...

Sometimes what you seek was obvious to everyone else, so they didn't
excessively document it. Sorry.

> need a library that provides simple functionality of take a string and
> doing html escaping
>
> " to "
> & to &

require 'cgi'
....

def test_escapeHTML()
scream = CGI::escapeHTML(">scream<")
assert_equal(scream, '&gt;scream&lt;')
end

--
Phlip
http://www.c2.com/cgi/wik...


Ara.T.Howard

4/29/2005 7:56:00 PM

0