Luca Scaljery
2008-Jul-22 14:06 UTC
howto turn off HTML escaping in form helper ''select''
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($ € €)
View:
form.select(:id, @crncy.collect {|c| [ c, ''bla'' ] }, {:prompt
=>
''€''})
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
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Jul-22 19:21 UTC
Re: howto turn off HTML escaping in form helper ''select''
On 22 Jul 2008, at 15:06, Luca Scaljery 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> Controller: > @crncy = %w($ € €) > > View: > form.select(:id, @crncy.collect {|c| [ c, ''bla'' ] }, {:prompt => > ''€''}) > > 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 > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Luca Scaljery
2008-Jul-23 07:20 UTC
Re: howto turn off HTML escaping in form helper ''select''
I red somewhere about an option :escape_html Will this or is this already included in a newer rails version ? thnx LuCa -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---