Re: Re: PHP DOM saveHTML outputs entities

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux