[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

to_plain_text() in hpricot doesn't do what you'd think it'd do...

Randy R

11/19/2007 12:56:00 PM

You'd think that the to_plain_text() method would conver the HTML to
whatever text would be rendered by a browser. That means stripping all the
extraneous whitespace, converting <br> and <p> tags to having appropriate
carriage returns, etc... Not only does it not do that but links exhibit
exceptionally weird behaviour. They append the URL of the link in square
brackets. What's up with that?
Can anyone explain the motivation behind the to_plain_text() method in
hpricot? Does anyone agree with my opinion on what it should do?
Thank you...