Frederick Cheung wrote in post #963584:
> On Nov 24, 2:47pm, Arun Kumar <li...@ruby-forum.com> wrote:
>> @test=Text.find(1)
>> Result output in browser for rails 3.0.1:
>> =========================================
>> Text from database: <p> i am paragraph tagged word </p>
>>
>> Why i didn't get the html result generated output in rails 3.0.1
>> Corrector suggest me what went wrong ?
>>
> Rails escapes your html for you these days, and by default it will
> assume that a piece of text of unknown provenance is not safe and so
> will escape it.
> You can either use the raw view helper or call html_safe on the string
> itself, ie
>
> <%= raw some_method_returning_html %> or <%
> some_method_returning_html.html_safe %>
>
> Fred
Thanks for the quick reply, It works fine for me,
Jak
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment