title: Codeigniter - htmlspecialchars() on input not working
body: <p>I'm using <code>htmlspecialchars()</code> on <code>input</code> field for <code>user last name</code> to prevent <code>xss</code>, but it's not working..
  Let's say <code>$user_data-&gt;user_last_name;</code> is my <code>user last name</code>, so I did:</p>
  
  <pre><code>htmlspecialchars( $user_data-&gt;user_last_name, ENT_QUOTES, 'UTF-8' );
  </code></pre>
  
  <p>When I try to save user last name as <code>'Lastname&lt;script&gt;alert("xss")&lt;/script&gt;'</code>, I get <code>JS alert</code> with <code>'xss'</code> message.</p>
  
  <p>Any clue maybe?</p>