note 103587 added to simplexmlelement.addchild

From: Date: Thu, 21 Apr 2011 13:17:22 +0000
Subject: note 103587 added to simplexmlelement.addchild
Groups: php.notes 
Request: Send a blank email to php-notes+get-179042@lists.php.net to get a copy of this message
Note that although addChild() escapes "<" and ">", it does not escape the ampersand "&". So addChild() is unsuited to handle user-defined input! Instead, you will have to replace all "&" with "&amp;" before calling addChild(). Or, use htmlspecialchars() which also replaces other characters, but won't do any harm as addChild() won't replace those again. ---- Server IP: 217.160.235.204 Probable Submitter: 93.241.47.122 ---- Manual Page -- http://www.php.net/manual/en/simplexmlelement.addchild.php Edit -- https://master.php.net/note/edit/103587 Del: integrated -- https://master.php.net/note/delete/103587/integrated Del: useless -- https://master.php.net/note/delete/103587/useless Del: bad code -- https://master.php.net/note/delete/103587/bad+code Del: spam -- https://master.php.net/note/delete/103587/spam Del: non-english -- https://master.php.net/note/delete/103587/non-english Del: in docs -- https://master.php.net/note/delete/103587/in+docs Del: other reasons-- https://master.php.net/note/delete/103587 Reject -- https://master.php.net/note/reject/103587 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#179042) next »