SpringFlowers AutumnMoon wrote:
[...]
> however, isn't it true that if we ever need to set the title into the 
> div's innerHTML, then we also need to sanitize it?
> 
> so    to_json(h(title))   ?

Actually, that would be h(to_json title).  Remember, you put it into 
JSON first, then escape it for HTML so it won't break the DOM.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
-- 
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to