Variable content is different upon content-type
<p>Upon transfering my site from one server to another, some functions started behaving differently.</p>

<p>The problem lies in building my rss feed. My feed are composed of database posts containing html, and to show them correctly in the feed I then need to change the picture paths to full domain paths, instead of just server root. For this purpose I use simple html dom (http://simplehtmldom.sourceforge.net).</p>

<p>When outputting the varaible html in Content-type: appilication/rss+xml it will show "Object id #1". Should I choose to output it before setting content-type, I get the right html. (in this case &lt; p >test&lt; /p >)</p>

<p>How come I can't output the variable html inside content-type rss+xml?</p>

<pre><code>require_once($_SERVER['DOCUMENT_ROOT'].'/lib/config.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/lib/functions/simple_html_dom.php');

$html = str_get_html("&lt;p&gt;test&lt;/p&gt;");

foreach($html-&gt;find('img') as $e) {
    $e-&gt;src = $siteconfig['full_domain'].$e-&gt;src;       
}

header("Content-Type: application/rss+xml; charset=UTF-8");

$rssfeed = "&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n";
$rssfeed .= "&lt;rss version=\"2.0\"&gt;\n";
$rssfeed .= "&lt;channel&gt;\n";
$rssfeed .= "&lt;title&gt;Headline&lt;/title&gt;\n";
$rssfeed .= "&lt;language&gt;da&lt;/language&gt;\n";
$rssfeed .= "&lt;item&gt;\n\t";
$rssfeed .= "&lt;description&gt;&lt;![CDATA[".$html."]]&gt;&lt;/description&gt;\n\t";
$rssfeed .= "&lt;/item&gt;\n";
$rssfeed .= "&lt;/channel&gt;\n";
$rssfeed .= "&lt;/rss&gt;";

echo $rssfeed;
</code></pre>
