Re: [Rails-core] Should an blank string be html_safe?

2010-05-17 Thread Santiago Pastorino
Remember you can use raw for output unsafe strings without being escaped On Mon, May 17, 2010 at 4:07 PM, RobL pgdst...@googlemail.com wrote: Just trying to implement a simple helper over the past few days had me really confused. messages = '' messages content_tag(:p, 'dave') #=

Re: [Rails-core] Should an blank string be html_safe?

2010-05-17 Thread Yehuda Katz
Mislav's example was without .html_safe. There's really no obvious way to make become html_safe without modifying Ruby. What about: x = y = #{x}#{safe_string} And even in the case of: x = x safe_string We'd have to override every single in the system (a serious performance problem) to

Re: [Rails-core] Should an blank string be html_safe?

2010-05-17 Thread Rob Lacey
Thanks for the clarification guys. RobL On 17 May 2010 23:19, Yehuda Katz wyc...@gmail.com wrote: Mislav's example was without .html_safe. There's really no obvious way to make become html_safe without modifying Ruby. What about: x = y = #{x}#{safe_string} And even in the case of: x =