# Html\_escape doesn't work in a text\_field\_tag?

**URL:** <https://www.ruby-forum.com/t/html-escape-doesnt-work-in-a-text-field-tag/141771>\
**Category:** Rails\
**Created:** [June 30, 2008, 2:47pm UTC](https://www.ruby-forum.com/t/html-escape-doesnt-work-in-a-text-field-tag/141771 "2008-06-30T14:47:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![deegee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e19adc/32.png) [@deegee](https://www.ruby-forum.com/u/deegee)\
**Post date:** [June 30, 2008, 2:47pm UTC](https://www.ruby-forum.com/t/html-escape-doesnt-work-in-a-text-field-tag/141771/1 "2008-06-30T14:47:44Z")

</div>

I’ve got a standard login form:

\<% form\_tag session\_path do -%\>

Login  
\<%= text\_field\_tag 'login', h(@login) %\>

Password  
\<%= password\_field\_tag 'password', nil %\>

\<%= submit\_tag 'Log in' %\>

\<% end -%\>

I’ve included the @login variable in an html\_escape, because I saw  
that if you enter /\>

However, even with the h(@login), the iframe is still displayed, so it  
looks like my @login variable isn’t escaped. Anyone knows of this  
problem?
