Nik
2009-Oct-01 19:19 UTC
how to make rails parse <p>, <b>, <strong> entered in text area?
Hello, I have this simple blog Post, I just want to jazz it up a bit with paragraphs, and bold faces, thought that wasn''t too much to ask for. But when I enter the following in the text area <strong>You won''t believe this!!</strong> and save submit it, and then display it in the show action, wherein I use <%= @article.body %> it displays exactly the same <strong>You won''t believe this!!</strong> I know about the "h" method and take care not to include it. -- I haven''t done anything else with the app, I just generated the app and rake db:migrate''d it and nothing else. So it is a clean start. now, can anyone hint me what I might need to do in addition to not include the "h" as in <%=h ... %> so to display html <strong> and etc? Thanks!!~~
jemminger
2009-Oct-01 19:31 UTC
Re: how to make rails parse <p>, <b>, <strong> entered in text area?
What version of Rails are you using? I seem to remember discussion of auto-escaping by default in v3, but to my knowledge and testing this is not the case as of 2.3.4. Check to make sure that your data is not html-escaped in the database.
Nik
2009-Oct-01 20:50 UTC
Re: how to make rails parse <p>, <b>, <strong> entered in text area?
Hi Jemminger, I am using 2.3.2 On Oct 1, 12:31 pm, jemminger <jemmin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> What version of Rails are you using? I seem to remember discussion of > auto-escaping by default in v3, but to my knowledge and testing this > is not the case as of 2.3.4. > > Check to make sure that your data is not html-escaped in the database.
Nik
2009-Oct-01 20:50 UTC
Re: how to make rails parse <p>, <b>, <strong> entered in text area?
oh yes and the database is mysql that comes with instantrails 2.0 On Oct 1, 12:31 pm, jemminger <jemmin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> What version of Rails are you using? I seem to remember discussion of > auto-escaping by default in v3, but to my knowledge and testing this > is not the case as of 2.3.4. > > Check to make sure that your data is not html-escaped in the database.