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

Discussion in 'Ruby' started by Just Another Victim of the Ambient Morality, Nov 19, 2007.

  1. 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...
    Just Another Victim of the Ambient Morality, Nov 19, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    600
  2. Replies:
    1
    Views:
    865
    Jack Klein
    Apr 13, 2005
  3. Ken
    Replies:
    35
    Views:
    2,251
  4. Phlip
    Replies:
    3
    Views:
    240
    anansi
    Jul 29, 2007
  5. David Mark
    Replies:
    17
    Views:
    236
    David Mark
    Mar 23, 2010
Loading...

Share This Page