WordPress.org

Make WordPress Core

Ticket #7771: wp-includes--class-IXR.php.diff

File wp-includes--class-IXR.php.diff, 1.0 KB (added by josephscott, 5 years ago)
  • wp-includes/class-IXR.php

     
    169169        xml_set_object($this->_parser, $this); 
    170170        xml_set_element_handler($this->_parser, 'tag_open', 'tag_close'); 
    171171        xml_set_character_data_handler($this->_parser, 'cdata'); 
     172 
     173                // libxml2 2.7.0 -2.7.2 stripping leading angle brackets bug patch 
     174                // See http://core.trac.wordpress.org/ticket/7771 
     175                if ( LIBXML_DOTTED_VERSION == '2.7.0' || LIBXML_DOTTED_VERSION == '2.7.1' || LIBXML_DOTTED_VERSION == '2.7.2' ) { 
     176                        $this->message = str_replace( '<', '<', $this->message ); 
     177                        $this->message = str_replace( '>', '>', $this->message ); 
     178                        $this->message = str_replace( '&', '&', $this->message ); 
     179                } 
     180 
    172181        if (!xml_parse($this->_parser, $this->message)) { 
    173182            /* die(sprintf('XML error: %s at line %d', 
    174183                xml_error_string(xml_get_error_code($this->_parser)),