Fixing libxml2, php, WordPress, and the missing angle brackets

Someone posted a temporary fix for WordPress that takes the raw xml and replaces the offending entities with characters. He found three places. The fix looks like:

//xmllib 2.7.0 -2.7.2 stripping leading angle brackets bug patch
if(LIBXML_DOTTED_VERSION == '2.7.0' ||
  LIBXML_DOTTED_VERSION == '2.7.1' ||
  LIBXML_DOTTED_VERSION == '2.7.2') {
  $xml =str_replace("<","<",$xml );
  $xml =str_replace(">",">",$xml );
  $xml =str_replace("&","&",$xml );
}
//end Fix
xml_parse($parser, $xml);

Tags: , , ,