title: Flask Safe text rendering user generated block
body: <p>Currently coding a bbs-style app, I'm wondering what are the best practices to display text that user entered safely. Which means I don't want them to type javascript or things like that. For now I'm rendering in a pre, and forbid the "&lt;" and ">" chars. Though I guess it is not the right way to do it. Plus the lines are cut while it shouldn't.    </p>
  
  <p>Could you please give me some hints on how to that ?   </p>
  
  <p>More informations : I'm storing those posts in a sqlite db using flask-sqlalchemy. So I don't want them to contain SQL-Injection (which I highly doubt it is possible to do with sqlalchemy)</p>