title: XML cdata tgas being erased when there's input in Russian
body: <p>I have a very strange problem which I will be very thankful if someone would help me with. </p>
  
  <p>I have a form that has a textarea whose content is later transferred to a page that has a line like this (using DOM with php to change data on an XML file):</p>
  
  <blockquote>
    <p>$dom->getElementsByTagName("page")->item($itemNum)->getElementsByTagName("lang")->item(1)->getElementsByTagName("text")->item(0)->firstChild->data=$_POST['rus0'];</p>
  </blockquote>
  
  <p>The XML file in question looks like this:</p>
  
  <blockquote>
    <p>&lt; text>&lt; ![CDATA[ Text from the form
    ]]>&lt; /text></p>
  </blockquote>
  
  <p>The strange thing happens when I upload it to the server and try to input Russian text, in which case it erases the CDATA completely and results in </p>
  
  <blockquote>
    <p>&lt; text/></p>
  </blockquote>
  
  <p>And, weirdly, the thing works fine on my own server emulator (I'm using MAMP with php 5, the remote server also has php 5) - in my machine inputing Russian works fine.</p>
  
  <p>Any ideas what's going on in this?</p>