Re: [PHP] Re: PHP DOM saveHTML outputs entities
- From: eli.hen@xxxxxxxxx (Eli)
- Date: Wed, 21 Mar 2007 11:48:19 +0200
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!
.
- References:
- PHP DOM saveHTML outputs entities
- From: Eli
- Re: PHP DOM saveHTML outputs entities
- From: Eli
- PHP DOM saveHTML outputs entities
- Prev by Date: Re: [PHP] Out source files
- Next by Date: [PHP] Flash animation without install Flash!
- Previous by thread: Re: PHP DOM saveHTML outputs entities
- Next by thread: Re: [PHP] PHP DOM saveHTML outputs entities
- Index(es):
Relevant Pages
|