Users at my website are able to write comments through special form. Field for value is a normal textarea. Now every comment is displayed without any html tags. It looks kinda weird when someone for instance post long comment. I would like to filter out value from all tags except new line chars (\n or \r\n).
I display that comments like that: <%=h @comment.value %>
What should I change? I was thinking about writing whole new method to filter all tags expect new line chars but I am sure that Ruby on Rails offers easier solution here.
use
simple_formatandhtogethersimple_formatessentially usegsubto convert line break into<br>and<p>tags.