Explorar o código

patch for libexpat contributed by Benjamin Dasnois

Franco Ponticelli %!s(int64=14) %!d(string=hai) anos
pai
achega
5e75644127
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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