|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-02-02 17:10 UTC] judge2005 at gmail dot com
[2017-02-02 17:55 UTC] requinix@php.net
[2017-02-02 18:10 UTC] judge2005 at gmail dot com
[2017-02-02 18:37 UTC] requinix@php.net
-Summary: createTextNode() does not handle binary data
+Summary: createTextNode() docs unclear about binary data and
metacharacters
-Status: Open
+Status: Verified
-Type: Bug
+Type: Documentation Problem
[2017-02-02 18:37 UTC] requinix@php.net
[2022-12-19 08:34 UTC] amin dot jabari242 at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 04:00:01 2025 UTC |
Description: ------------ If binary data is passed to createTextNode() it can cause invalid XML to be generated. Test script: --------------- <?php $document = new DOMDocument('1.0', 'UTF-8'); $document->formatOutput = true; $root = $document->createElement('example'); $document->appendChild($root); $example = $document->createTextNode("PK"); $root->appendChild($example); echo $document->saveXML(); Actual result: -------------- <?xml version="1.0" encoding="UTF-8"?> <example>PK</example>