Remember you can use raw for output unsafe strings without being escaped On Mon, May 17, 2010 at 4:07 PM, RobL <[email protected]> wrote: > Just trying to implement a simple helper over the past few days had me > really confused. > > messages = '' > messages << content_tag(:p, 'dave') > #=> <p>dave<\p%;gt; > > Eventually I realised the original empty string was not html_safe > > message = ''.html_safe > message << content_tag(:p, 'dave') > #=> <p>dave</p> > > Is this intentional behavour? > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > >
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
