Wednesday, November 10, 2010

[Rails] Re: £ Troubles

Thanks very much.

On Nov 10, 3:26 pm, Marnen Laibow-Koser <li...@ruby-forum.com> wrote:
> Bill Morrison wrote in post #960534:
>
> > I have <%= f.label :cost, "Cost (&pound;/m)" %> in a file
> > _form.html.erb. When the form is rendered instead of getting "" I
> > just get "&pound;" being rendered. I am using utf-8 encoding. Why is
> > this happening?
>
> Are you using Rails 3, by any chance?  If so, then strings get
> HTML-escaped by default. Either use the literal £ character (probably
> the best choice) or mark the string as raw.
>
> In general, except for &lt;, &gt;, &amp;, and maybe &nbsp;, there's
> little reason to use &entities in HTML files these days.
>
> Best,
> -- 
> Marnen Laibow-Koserhttp://www.marnen.org
> mar...@marnen.org
>
> --
> Posted viahttp://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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate