Browse Source

patch for libexpat contributed by Benjamin Dasnois

Franco Ponticelli 14 years ago
parent
commit
5e75644127
1 changed files with 5 additions and 0 deletions
  1. 5 0
      std/php/_std/Xml.hx

+ 5 - 0
std/php/_std/Xml.hx

@@ -79,6 +79,11 @@ enum XmlType {
 	}
 
 	private static function __default_handler(parser : Dynamic, data : String) : Void {
+		//On some PHP setups (seems to happen when libexpat is used) we may get called for such "entities" although character_data will correctly be called afterward.
+		if(data == "<![CDATA[")
+			return;
+		if(data == "]]>")
+			return;
 		if ("<!--" == data.substr(0, 4))
 			build.addChild(createComment(data.substr(4, data.length-7)));
 		else