note 63786 added to function.xml-parser-create

From: Date: Thu, 30 Mar 2006 16:55:54 +0000
Subject: note 63786 added to function.xml-parser-create
Groups: php.notes 
Request: Send a blank email to php-notes+get-107045@lists.php.net to get a copy of this message
keyword: XML PHP parser error on line 1 after a grand struggle, the answer to my problem was simply: stripslashes() when XML content gets transferred via HTML through a POST, " and ' becomes \" and \'. xml_parser_create then does not locate the header of the XML string variable, and you get XML error: something whatever line 1. so grab your POSTed variable, but before you send it to your parser (if you are using a freely available user-created function such as xmlize() or something, chances are still they are within the function using xml_parser_create), make sure you run this: stripslashes($_POST["xmlvariable"]); ---- Server IP: 216.194.113.175 Probable Submitter: 216.73.153.113 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.xml-parser-create.php Edit -- http://master.php.net/note/edit/63786 Del: integrated -- http://master.php.net/note/delete/63786/integrated Del: useless -- http://master.php.net/note/delete/63786/useless Del: bad code -- http://master.php.net/note/delete/63786/bad+code Del: spam -- http://master.php.net/note/delete/63786/spam Del: non-english -- http://master.php.net/note/delete/63786/non-english Del: in docs -- http://master.php.net/note/delete/63786/in+docs Del: other reasons-- http://master.php.net/note/delete/63786 Reject -- http://master.php.net/note/reject/63786 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#107045) next »