# Edit content of html tags

**URL:** <https://www.ruby-forum.com/t/edit-content-of-html-tags/93189>\
**Category:** Rails\
**Created:** [April 28, 2007, 11:22pm UTC](https://www.ruby-forum.com/t/edit-content-of-html-tags/93189 "2007-04-28T23:22:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [April 28, 2007, 11:22pm UTC](https://www.ruby-forum.com/t/edit-content-of-html-tags/93189/1 "2007-04-28T23:22:46Z")

</div>

Hi,

Is anyone aware of a nice gem or way that will allow me to edit the  
content of all html tags except

```
tags?

Cheers,  
josh
```

---

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [April 28, 2007, 11:35pm UTC](https://www.ruby-forum.com/t/edit-content-of-html-tags/93189/2 "2007-04-28T23:35:52Z")

</div>

Josh

> Is anyone aware of a nice gem or way that will allow me to edit the  
> content of all html tags except
> 
> ```
> tags?
> ```

Look at hpricot: (see the example at the top of the page)  
[http://code.whytheluckystiff.net/hpricot/](http://code.whytheluckystiff.net/hpricot/)  
and this hpricot extension:  
[http://henrik.nyh.se/2007/03/transform-all-text-nodes-excepting-elements-with-hpricot](http://henrik.nyh.se/2007/03/transform-all-text-nodes-excepting-elements-with-hpricot)

Alain

---

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [April 29, 2007, 2:56pm UTC](https://www.ruby-forum.com/t/edit-content-of-html-tags/93189/3 "2007-04-29T14:56:49Z")

</div>

Alain R. wrote:

> Josh
> 
> > Is anyone aware of a nice gem or way that will allow me to edit the  
> > content of all html tags except
> > 
> > ```
> > tags?
> > ```
> 
> Look at hpricot: (see the example at the top of the page)  
> [http://code.whytheluckystiff.net/hpricot/](http://code.whytheluckystiff.net/hpricot/)  
> and this hpricot extension:  
> [http://henrik.nyh.se/2007/03/transform-all-text-nodes-excepting-elements-with-hpricot](http://henrik.nyh.se/2007/03/transform-all-text-nodes-excepting-elements-with-hpricot)
> 
> Alain

thanks, looks like exactly what is needed.
