title: MySQL HTML sanitization
body: <p>I have a website that saves data to a MySQL database</p>
  
  <p>Should I escape the HTML upon inserting it into MySQL or upon displaying it on my website?</p>
  
  <p>Ideally, I'd like to input raw HTML into my database and just sanitize each time I pull from it. Is there any danger in doing it this way?</p>
  
  <p>Example html:<code>&lt;h1&gt;test&lt;/h1&gt;</code></p>