title: Prevent XSS with strip_tags()?
body: <p>I have a PHP web applications. I do NOT want to allow users to post HTML to my site.</p>
  
  <p>If I simply run <code>strip_tags</code>() on all data prior to saving into my database, will <code>strip_tags</code>() be enough to prevent XSS?</p>
  
  <p>I ask because it's unclear to me from reading the <a href="http://php.net/strip_tags" rel="noreferrer">documentation of strip_tags</a> if XSS is prevented. There seems to be some bug with browser allowing <code>&lt;0/script&gt;</code> (yes, a zero) as valid HTML.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I realize that I can simply run <code>htmlspecialchars</code> on all outputted data; however, my thought is that - since I don't want to allow HTML in the first place, it's simply easier (and academically better) to clean my data once and for all, before saving in my database, then have to worry every time I output the data if the data is safe or not.</p>