title: draft-to-html with React's dangerouslySetInnerHTML
body: <p>I'm using <code>draft-to-html</code> npm package to display <code>draftjs</code> content to a div using <code>dangerouslySetInnerHTML</code>.</p>
  
  <p>Something like this:</p>
  
  <pre><code>&lt;div dangerouslySetInnerHTML={{ __html: draftToHtml(JSON.parse(intro)) }} /&gt;
  </code></pre>
  
  <p><code>intro</code> is user input and have not been sanitized. This feels bad but shouldn't <code>draft-to-html</code> only output known html tags such as <code>H1-6, ul, ol, pre, p</code> etc.?</p>
  
  <p>Also, how would I sanitize a draftjs object?</p>