Group: comp.lang.ruby


Subject: to_plain_text() in hpricot doesn't do what you'd think it'd do...
From: Just Another Victim of the Ambient Morality
Date: 11/19/2007 12:56:06 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...