# Howto turn off HTML escaping in form helper 'select'

**URL:** <https://www.ruby-forum.com/t/howto-turn-off-html-escaping-in-form-helper-select/143764>\
**Category:** Rails\
**Created:** [July 22, 2008, 4:06pm UTC](https://www.ruby-forum.com/t/howto-turn-off-html-escaping-in-form-helper-select/143764 "2008-07-22T16:06:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeanluca](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/74df32/32.png) [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Post date:** [July 22, 2008, 4:06pm UTC](https://www.ruby-forum.com/t/howto-turn-off-html-escaping-in-form-helper-select/143764/1 "2008-07-22T16:06:02Z")

</div>

Hi All

I noticed that the form helper ‘select’ does automatically do HTML  
escaping for values within the option tag. I need to show thing like the  
euro sign, so I need to be able to turn this feature off.

Controller:  
@crncy = %w($ &#8364 €)

View:  
form.select(:id, @crncy.collect {|c| [c, ‘bla’] }, {:prompt =\>  
‘&#8364’})

The euro sign in :prompt is shown correctly, but the others are not.

Any suggestions ?

thnx  
LuCa

ps I’m using rails 2.0.2

---

<div class="post-metadata">

**Author:** ![jeanluca](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/74df32/32.png) [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Post date:** [July 22, 2008, 9:22pm UTC](https://www.ruby-forum.com/t/howto-turn-off-html-escaping-in-form-helper-select/143764/2 "2008-07-22T21:22:35Z")

</div>

On 22 Jul 2008, at 15:06, Luca S. wrote:

> Hi All
> 
> I noticed that the form helper ‘select’ does automatically do HTML  
> escaping for values within the option tag. I need to show thing like  
> the  
> euro sign, so I need to be able to turn this feature off.

It’s hardcoded to do this. Can’t thing of anything you can do except  
build up the option tags yourself.

Fred

---

<div class="post-metadata">

**Author:** ![jeanluca](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/74df32/32.png) [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Post date:** [July 23, 2008, 9:20am UTC](https://www.ruby-forum.com/t/howto-turn-off-html-escaping-in-form-helper-select/143764/3 "2008-07-23T09:20:27Z")

</div>

I red somewhere about an option :escape\_html  
Will this or is this already included in a newer rails version ?

thnx  
LuCa
