|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-02-02 19:52 UTC] rrichards@php.net
[2006-02-02 20:47 UTC] thom at genx dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 21:00:01 2025 UTC |
Description: ------------ When a copyright character (ascii 169) is present in a string that is added as a text node to the DOM structure, the element is always empty. The correct behavior is to encode the character as "©". Reproduce code: --------------- <?php $doc = new DOMDocument('1.0'); $t = $doc->appendChild($doc->createElement('test')); $t->appendChild($doc->createTextNode('&' . chr(169) . '<')); header('Content-type: text/xml'); echo $doc->saveXML(); ?> Expected result: ---------------- <?xml version="1.0"?> <test>&©<</test> Actual result: -------------- <?xml version="1.0"?> <test></test>