title: str_replace not working in html codes
body: <p>i'm working with a form one of its fields is an RTF textarea (jWYSIWYG), that is autofilled with some database information at the load of the page, all that using Symfony framework. This RTF editor can add some html tags like <code>&lt;p&gt;</code>,<code>&lt;b&gt;</code>, etc.</p>
  
  <p>The trouble starts when i try to know if the textarea has been modified before sending the form: what i get from the <code>$request</code> is that all the html tags are coded like <code>&amp;lt;p&amp;gt;</code>,<code>&amp;lt;b&amp;gt;</code>, etc. I tryed to replace that expressions with the <code>&lt;</code> and <code>&gt;</code> characters so i can compare it to the stored data.</p>
  
  <pre><code>$codes = array('&amp;gt;','&amp;lt;');
  $chars = array('&lt;'   ,'&gt;' );
  return str_replace($codes,$chars,$text);
  </code></pre>
  
  <p>but this function returns me the same array i pass as parameter of the <code>str_replace</code> function. What am I doing wrong? have anyone had the same problem?</p>