# Opposite of h()

**URL:** <https://www.ruby-forum.com/t/opposite-of-h/119015>\
**Category:** Rails\
**Created:** [November 2, 2007, 5:42am UTC](https://www.ruby-forum.com/t/opposite-of-h/119015 "2007-11-02T05:42:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Swasey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@Matthew\_Swasey](https://www.ruby-forum.com/u/Matthew_Swasey)\
**Post date:** [November 2, 2007, 5:42am UTC](https://www.ruby-forum.com/t/opposite-of-h/119015/1 "2007-11-02T05:42:54Z")

</div>

Is there an opposite to the function h()? or html()?

Something that takes escaped html and turns it back into html?

I suppose I could do it myself with a few gsubs, but i’d rather use a  
built-in function if there is one.

This maybe obvious, but I’ve been looking and looking and can’t find  
anything.

---

<div class="post-metadata">

**Author:** ![Matthew\_Swasey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@Matthew\_Swasey](https://www.ruby-forum.com/u/Matthew_Swasey)\
**Post date:** [November 2, 2007, 3:52pm UTC](https://www.ruby-forum.com/t/opposite-of-h/119015/2 "2007-11-02T15:52:31Z")

</div>

Excellent! Thank you.

---

<div class="post-metadata">

**Author:** ![Matthew\_Swasey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@Matthew\_Swasey](https://www.ruby-forum.com/u/Matthew_Swasey)\
**Post date:** [November 2, 2007, 1:01pm UTC](https://www.ruby-forum.com/t/opposite-of-h/119015/3 "2007-11-02T13:01:20Z")

</div>

Matthew Swasey wrote:

> Is there an opposite to the function h()? or html()?
> 
> Something that takes escaped html and turns it back into html?

Perhaps CGI.unescapeHTML

[http://www.ruby-doc.org/core/classes/CGI.src/M000547.html](http://www.ruby-doc.org/core/classes/CGI.src/M000547.html)

–  
We develop, watch us RoR, in numbers too big to ignore.
