title: DOMDocument append already fixed html from string
body: <p>So im trying to show a snapshot html from a page using DOMDocument. What i have so far is my home page which i load from a remote location </p>
  
  <pre><code>$dom = new DOMDocument('1.0', 'UTF-8');
  $dom-&gt;loadHTML($remote);
  </code></pre>
  
  <p>then i choose two elements, my head area and a div inside main content where i will be adding my content (html took from a string variable)</p>
  
  <pre><code>$head = $dom-&gt;getElementsByTagName('head')-&gt;item(0);
  $noticia2 = $dom-&gt;getElementById('content_home');
  </code></pre>
  
  <p>following this i have added content to my script tag</p>
  
  <pre><code>$jquery = '$(document).ready(function(){ $("#feed_home").hide()});
        if (window.location.hash) {
          Destino = window.location.hash.replace(\'#!\', \'?\');
  
               window.location.href = window.location.href.split(\'#\')[0] + Destino;
      }
  
  
  ';    
  
  $script = $dom-&gt;createElement('script', $jquery);
  $script_type = $dom-&gt;createAttribute('type');
  
  $script_type-&gt;value = 'application/javascript';
  $script-&gt;appendChild($script_type);
  
  $head-&gt;appendChild($script);
  </code></pre>
  
  <p>Then i go through my database and i collect some info which i will be formating with html tags in a big $content string using mysql_fetch_array. And now my problem.... whenever i try to append this inside my $div node i cant manage to have this content treated as HTML so im having problems displaying this stuff.</p>
  
  <pre><code>$div = $dom-&gt;createElement('div', $content);
  $div_class = $dom-&gt;createAttribute('class');
  $div_class-&gt;value = 'noticia-ajax';
  $div-&gt;appendChild($div_class);
  $noticia2-&gt;appendChild($div);
  echo $dom-&gt;saveHTML();
  </code></pre>
  
  <p>What i get is a normal page, with my div "noticia-ajax" well formed and then inside this guy i have     </p>
  
  <pre><code>SOME TEXT &lt;BR&gt; AND NO HTML TAG TREATED AS HTML TAG &lt;BR&gt; SOMETHING LIKE THIS 
  </code></pre>
  
  <p>And ofcourse i would like to have all of this tags read as html! right?</p>