Doc #50742 [Com]: value parameter must be escaped

From: Date: Wed, 31 Mar 2010 17:36:25 +0000
Subject: Doc #50742 [Com]: value parameter must be escaped
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4131@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=50742&edit=1 ID: 50742 Comment by: sites at hubmed dot org Reported by: ifland at gmail dot com Summary: value parameter must be escaped Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: n/a PHP Version: Irrelevant New Comment: DOMDocument::createTextElement doesn't exist. Should it be DOMDocument::createTextNode()? This note could be added to the documentation for DOMDocument::createElementNS as well. Previous Comments: ------------------------------------------------------------------------ [2010-01-16 22:13:23] svn@php.net Automatic comment from SVN on behalf of bjori Revision: http://svn.php.net/viewvc/?view=revision&revision=293630 Log: Rephrase after reading bug#31191 (see bug#50742) ------------------------------------------------------------------------ [2010-01-16 22:09:39] bjori@php.net This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. ------------------------------------------------------------------------ [2010-01-16 22:09:23] svn@php.net Automatic comment from SVN on behalf of bjori Revision: http://svn.php.net/viewvc/?view=revision&revision=293629 Log: - Fixed bug#50742 (value parameter must be escaped) - Kill "you" usage ------------------------------------------------------------------------ [2010-01-13 18:00:52] ifland at gmail dot com Description: ------------ The value parameter must be escaped - putting ampersands in the string will cause an exception. See http://bugs.php.net/bug.php?id=31191 Reproduce code: --------------- --- From manual page: domdocument.createelement#Parameters --- "The value of the element. By default, an empty element will be created. You can also set the value later with DOMElement->nodeValue." Expected result: ---------------- There should be a comment about how the $value parameter must be escaped and that the developer probably should use $document->createTextElement() instead. Perhaps something like this: "The ampersand-escaped value of the element. By default, an empty element will be created. You can also set the value later with DOMElement->nodeValue. To create a text node with escaping support, leave out this parameter, use DOMDocument->createTextElement() and append the text node to your DOMElement." Actual result: -------------- "The value of the element. By default, an empty element will be created. You can also set the value later with DOMElement->nodeValue." ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=50742&edit=1

« previous php.doc.bugs (#4131) next »