How do I encode/decode HTML entities in Ruby? -


I'm trying to decode some HTML entities, like '& amp; Amp; Lt; ' '& lt;' is happening.

I have an old gem (), but it seems that it has been left twice.

Any recommendations? I will need to use it in a model.

can:

 : jmglov @ laurana; Sudo gem installed friendly Successfully installed htmlentities-4.2.4: jmglov @ laurana; Irb irb (main): 001: 0> Required 'htmlentities' = & gt; [] Irb (main): 002: 0> HTMLEntities.new.decode "& amp; iexcl; I'm angry with high & amp; nbsp; character references!" = & Gt; "I am very worried about the character's references!"    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -