title: jQuery load function escapes data
body: <p>I have a strange problem with the load function from jQuery. It escapes HTML content that jQuery gets back from the load function. I load HTML output from a PHP file into a div. I use this function: </p>
  
  <pre><code>function XXX(file,divName,functionToCall)
  {
      $("#" + divName).load(file,null,function()
      {
          functionToCall();
      });
  };
  </code></pre>
  
  <p>The HTML output of the PHP file:</p>
  
  <p><code>&lt;div onClick="xxx(0,'xxx')" id="xxx"&gt;&lt;/div&gt;</code></p>
  
  <p>Jquery converts it into:</p>
  
  <p><code>&lt;div onClick="xxx(0,\'xxx\')" id="xxx"&gt;&lt;/div&gt;</code></p>
  
  <p>Because of this convention I can't use the onClick function, it isn't valid any more. I can't figure out what I 'm doing wrong, does some one know what causes this problem and how to solve this in a good way? I already read other related question on Stack overflow, but I couldn't find an answer how to avoid escaping.</p>