Ruby based HTML - to - text converter?


#1

All,

I am interested in trying to generate a text version of an HTML
document.

Does any one know of any modules that may be of use to me?

A cursory search has not yielded any results.

Thanks,
Wes


#2

Wes G. wrote:

All,

I am interested in trying to generate a text version of an HTML
document.

Does any one know of any modules that may be of use to me?

A cursory search has not yielded any results.

Thanks,
Wes

there is a built-in method that does just that.

sanitize(html) and strip_tags(html) are along the lines of what you’re
talking about.

See the docs:
http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#M000516