title: Rails comments system with bb-code
body: <p>In my rails 4 app i want to add comments to my articles, but i want to add functional as most forum-engines do (like SMF),  and i need to add bb-code for it. </p>
  
  <p>Are there any good gem for it? With rails 4 support? How then in controller i can translate [quote] to some div with some style? </p>
  
  <p>Also how is it good to store html data in database? </p>
  
  <p>For example if i use haml, and somebody post comment as</p>
  
  <pre><code>- current_user.id
  </code></pre>
  
  <p>or something similar to this, how to secure my app from "bad boys" ? Sure i can change comments system to something like: quote_parent_id, but if i have multiple quotes in one comment? so it is hard to realise, better is to store html, but to secure it somehow.</p>
  
  <p>Could i do this? And how? Please give good ideas, tutorials, gem-links.</p>