Rails 3 - Ruby 1.9.2 - cannot output correctly HTML special characters

this is my first Rails3-Ruby 1.9.2 test app…
I cannot out a simple html string w special characters like ©

copyright = “Copyright © " + " 2010 , TestApp Ltd.”

using copyright in my view, I see displayed

Copyright © 2010, TestApp Ltd.

what’s wrong ? what’s missing somewhere (was running well in Rails
2.3-Ruby 1…8.7 )

thanks fyi

On 09 Aug 2010, at 13:54, Erwin wrote:

2.3-Ruby 1…8.7 )
HTML escaping is done by default in Rails 3:

http://asciicasts.com/episodes/204-xss-protection-in-rails-3
http://www.railsdispatch.com/posts/security
http://yehudakatz.com/2010/02/01/safebuffers-and-rails-3-0/

The solution in is the posts above.

Best regards

Peter De Berdt

Thanks Peter … I missed that : copyright.html_safe

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs