note 91125 added to domdocument.createelement
| From: | chrisATcmbuckleyDOTcoDOTuk at osu1 dot php dot net | Date: | Tue, 26 May 2009 14:45:45 +0000 |
| Subject: | note 91125 added to domdocument.createelement | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-156027@lists.php.net to get a copy of this message | ||
Note that the NUL character "\0" is not in the list of invalid characters for $name, so no
error is triggered, but the tag name will be truncated at the null byte:
<?php
$dom = new DOMDocument('1.0', 'utf-8');
$el = $dom->createElement('foo' . "\0" . 'bar', 'Hello
World');
echo $el->tagName; // outputs "foo"
?>
----
Server IP: 64.71.164.2
Probable Submitter: 193.36.79.206
----
Manual Page -- http://www.php.net/manual/en/domdocument.createelement.php
Edit -- https://master.php.net/note/edit/91125
Del: integrated -- https://master.php.net/note/delete/91125/integrated
Del: useless -- https://master.php.net/note/delete/91125/useless
Del: bad code -- https://master.php.net/note/delete/91125/bad+code
Del: spam -- https://master.php.net/note/delete/91125/spam
Del: non-english -- https://master.php.net/note/delete/91125/non-english
Del: in docs -- https://master.php.net/note/delete/91125/in+docs
Del: other reasons-- https://master.php.net/note/delete/91125
Reject -- https://master.php.net/note/reject/91125
Search -- https://master.php.net/manage/user-notes.php