Hi,
I’m looking for a way to convert html to plain text.
Now, I know about strip_tags, but - as the name says - that only
strips the tags.
What I need is to get stuff like & and < back to & and < too.
Any help?
Thanks,
Mathijs
Hi,
I’m looking for a way to convert html to plain text.
Now, I know about strip_tags, but - as the name says - that only
strips the tags.
What I need is to get stuff like & and < back to & and < too.
Any help?
Thanks,
Mathijs
You could use some regexp and the hash ERB::Util::HTML_ESCAPE to
return the unescaped versions of the characters.
On Oct 1, 3:31 pm, “[email protected]” [email protected]
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs