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("&lt;","<",$xml );
  $xml =str_replace("&gt;",">",$xml );
  $xml =str_replace("&amp;","&",$xml );
}
//end Fix
xml_parse($parser, $xml);

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.