# Removing HTML tags

**URL:** <https://www.ruby-forum.com/t/removing-html-tags/112628>\
**Category:** Rails\
**Created:** [August 21, 2007, 3:35pm UTC](https://www.ruby-forum.com/t/removing-html-tags/112628 "2007-08-21T15:35:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [August 21, 2007, 3:35pm UTC](https://www.ruby-forum.com/t/removing-html-tags/112628/1 "2007-08-21T15:35:29Z")

</div>

Hello all,  
I’m working on a bit of code that needs to convert HTML to plain text.  
Is there an easy way to do this in Ruby, or do I need to write some code  
to handle it with a regular expression? I only want the human-readable  
parts of the page, so I also have to remove anything within script tags.

Thanks,  
Will

Yes, even I blog now:

[http://willsmentaldebris.blogspot.com/](http://willsmentaldebris.blogspot.com/)

* * *

Got a little couch potato?  
Check out fun summer activities for kids.

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [August 21, 2007, 4:22pm UTC](https://www.ruby-forum.com/t/removing-html-tags/112628/2 "2007-08-21T16:22:43Z")

</div>

see ActionView::Helpers::TextHelper#strip\_tags

Will G. wrote:

> Yes, even I blog now:
> 
> [http://willsmentaldebris.blogspot.com/](http://willsmentaldebris.blogspot.com/)
> 
> * * *
> 
> Got a little couch potato?  
> Check out fun summer activities for kids.  
> [http://us.rd.yahoo.com/evt=48248/\*http://search.yahoo.com/search?fr=oni\_on\_mail&p=summer+activities+for+kids&cs=bz](http://us.rd.yahoo.com/evt=48248/*http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz)
> 
> >

–  
Sincerely,

William P.
