Is there a way to convert HTML to the correct text? I tried everything: from raw to sanitation and even with a mail stone using the text_part method, which should do just that, but it does not work for me.
My best shot so far has been strip_tags(strip_links(resource.body)) , but <p> , <ul> etc. were not converted correctly.
This is more or less what I have in HTML:
Hello This is some text. Blah blah blah. Address: John Doe 10 ABC Street Whatever City New Features - Feature A - Feature B - Feature C Check this out: http:
which translates to something like
Hello This is some text. Blah blah blah. Address: John Doe 10 ABC Street Whatever City New Features Feature A Feature B Feature C Check this out: http:
Any idea?
ruby-on-rails ruby-on-rails-3 html-to-text
Cojones
source share