I’m looking for a way to convert HTML to text. I tried using sanatize to strip out HTML tags but that fails as some HTML has tags like:
<pre>adasdadadad</pre>
Which is text output where with sanatize it removes the tag and the text is lost.
Ideas?
I think you are looking for strip_tags.
That links says it is deprecated but this says it works for rails 3.
Or as Paul correctly points out you might to try an updated API.