Re: Re: PHP DOM saveHTML outputs entities

From: Date: Wed, 21 Mar 2007 09:48:19 +0000
Subject: Re: Re: PHP DOM saveHTML outputs entities
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-250994@lists.php.net to get a copy of this message
Tijnema ! wrote:
Did you set the UTF8 format in the html_entity_decode function? so your code would become: <?php $dom = new DOMDocument('1.0','utf-8'); $dom->loadXML("<html><body>שלום</body></html>"); $output = $dom->saveHTML(); header("Content-Type: text/html; charset=UTF-8"); echo html_entity_decode($output,ENT_QUOTES,"UTF-8"); ?>
Yes. This works... thanks! :-) But actually I wanted to avoid the saveHTML() method from converting to html entities in the first place, if possible at all. -thanks!

« previous php.general (#250994) next »