WordPress.org

Plugin Directory

Changeset 524298


Ignore:
Timestamp:
03/27/12 13:29:00 (2 years ago)
Author:
duck_
Message:

Stop regex parser breaking serialized data (e.g. post meta) with slashed quotes. See #WP15252.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wordpress-importer/trunk/parsers.php

    r501867 r524298  
    463463 
    464464    function get_tag( $string, $tag ) { 
    465         global $wpdb; 
    466465        preg_match( "|<$tag.*?>(.*?)</$tag>|is", $string, $return ); 
    467466        if ( isset( $return[1] ) ) { 
     
    478477                $return = $return[1]; 
    479478            } 
    480             $return = $wpdb->escape( trim( $return ) ); 
    481479        } else { 
    482480            $return = ''; 
     
    539537        $post_type      = $this->get_tag( $post, 'wp:post_type' ); 
    540538        $post_password  = $this->get_tag( $post, 'wp:post_password' ); 
    541         $is_sticky      = $this->get_tag( $post, 'wp:is_sticky' ); 
     539        $is_sticky      = $this->get_tag( $post, 'wp:is_sticky' ); 
    542540        $guid           = $this->get_tag( $post, 'guid' ); 
    543541        $post_author    = $this->get_tag( $post, 'dc:creator' ); 
Note: See TracChangeset for help on using the changeset viewer.