title: What does htmlentities with ENT_QUOTES and UTF-8 do?
body: <p>I have always used simple <code>htmlentities($_POST['string']);</code> to clean data for any XSS attacks.
  Recently I have seen people use this:</p>
  
  <pre><code>htmlentities($_POST['string'], ENT_QUOTES, 'UTF-8');
  </code></pre>
  
  <p>What is the advantage or purpose of using that over just <code>htmlentities()</code>.</p>
  
  <p>Also don't know if it is relevant but I use meta UTF-8 always at the top of my pages.</p>