Can't figure out why "\n" is not removed
<p>The solution is probably an easy one, but I can't figure out why it doesn't work:</p>

<p>I submit a from using jQuery's Form plug-in, then run the it through:</p>

<p><code>str_replace(array("\r", "\n\t"), "", $_POST['mytext'])</code></p>

<p>Looking at the HTTP header, "\n" are not added anywhere. However, when I then print $_POST['mytext'] from PHP (just for testing purposes), Firebug shows "\n" all over the place:</p>

<pre><code>&amp;lt;html&amp;gt;\n  &amp;lt;head&amp;gt;\n      &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;\n   &amp;lt;/head&amp;gt;\n &amp;lt;body&amp;gt;\n      &amp;lt;h3&amp;gt;\n            We are.....
</code></pre>

<p>What's interesting is that if I select this output, manually assign it to a var and then run str_replace on it, all \n characters disappear. WHY wouldn't it do with the $_POST variable? </p>

<p>Please help. Going crazy with what seems to be a trivial task. </p>

<p>P.S. I do have a .htaccess rewrite rule, but doubt it messes with anything:</p>

<pre><code>RewriteRule ^/update_text/? my.php?action=update_text [QSA]
</code></pre>

<p>QSA is needed to transmit other $_GET data from my JS. </p>

<hr>

<p>Problem "kind of solved". I replaced $_POST with $_REQUEST and it's all dandy now. Still don't understand why $_POST would behave this way. </p>
