Friday 15 July 2011

Rails render wrong match html tag -


Some of the content of my posts & lt; / Div & gt; are tags, so when I post by body:

  <% = simple_format (post.body)%>   

The format will be in horrible disorder.

How to do it correctly?

You can post.body in & lt; / Div & gt; can get rid of: <: / P>

  <% = simple_format (post.body.gsub ('& lt; / div>', ''))% & Gt;    

No comments:

Post a Comment