Forum: Ruby on Rails Ruby based HTML - to - text converter?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Wes G. (Guest)
on 2006-05-04 00:27
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
BB (Guest)
on 2006-05-04 01:54
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/Help...
This topic is locked and can not be replied to.