# Html\_escape method

**URL:** <https://www.ruby-forum.com/t/html-escape-method/111919>\
**Category:** Rails\
**Created:** [August 13, 2007, 2:25pm UTC](https://www.ruby-forum.com/t/html-escape-method/111919 "2007-08-13T14:25:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishvanathan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/c0e974/32.png) [@vishvanathan](https://www.ruby-forum.com/u/vishvanathan)\
**Post date:** [August 13, 2007, 2:25pm UTC](https://www.ruby-forum.com/t/html-escape-method/111919/1 "2007-08-13T14:25:28Z")

</div>

Hi,

I need to use the html\_escape function in my project.And I had tired the  
html\_escape or h function in the view.

example: \<%= h “\< Hello \>” %\>

Result:

\< Hello \>

But I am not get any html escaped characters for \< and \>.

Is there any special steps include in my project?

---

<div class="post-metadata">

**Author:** ![vishvanathan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/c0e974/32.png) [@vishvanathan](https://www.ruby-forum.com/u/vishvanathan)\
**Post date:** [August 13, 2007, 2:43pm UTC](https://www.ruby-forum.com/t/html-escape-method/111919/2 "2007-08-13T14:43:57Z")

</div>

Vishvanathan Kuppusamy wrote:

> But I am not get any html escaped characters for \< and \>.
> 
> Is there any special steps include in my project?

Did you actually view the source for that page?

–  
Michael W.

---

<div class="post-metadata">

**Author:** ![vishvanathan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/c0e974/32.png) [@vishvanathan](https://www.ruby-forum.com/u/vishvanathan)\
**Post date:** [August 14, 2007, 5:12am UTC](https://www.ruby-forum.com/t/html-escape-method/111919/3 "2007-08-14T05:12:47Z")

</div>

Michael W. wrote:

> Vishvanathan Kuppusamy wrote:
> 
> > But I am not get any html escaped characters for \< and \>.
> > 
> > Is there any special steps include in my project?
> 
> Did you actually view the source for that page?
> 
> –  
> Michael W.

Dear Wang,

Thank you for your reply. The html escape characters are availabe in  
that source page.

Have a nice day.
