CARVIEW |
Select Language
HTTP/2 200
server: nginx
date: Sat, 11 Oct 2025 10:46:15 GMT
content-type: text/html;charset=utf-8
vary: Accept-Encoding
etag: W/"anonymous/Tue, 07 Feb 2012 22:00:03 GMT/925952c55cec315866ce72804d1f2e55"
cache-control: must-revalidate
alt-svc: h3=":443"; ma=86400
x-nc: MISS
content-encoding: gzip
Changeset 501867 – WordPress Plugin Repository
Skip to content
Changeset 501867
- Timestamp:
- 02/07/2012 10:00:03 PM (14 years ago)
- Author:
- duck_
- Message:
-
Add support for escaped closing CDATA sequences "]]]]><![CDATA[>" (WXR_VERSION 1.2) to the regex parser. See https://core.trac.wordpress.org/ticket/15203.
- Location:
- wordpress-importer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
wordpress-importer/trunk/parsers.php
r380920 r501867 466 466 preg_match( "|<$tag.*?>(.*?)</$tag>|is", $string, $return ); 467 467 if ( isset( $return[1] ) ) { 468 $return = preg_replace( '|^<!\[CDATA\[(.*)\]\]>$|s', '$1', $return[1] ); 468 if ( substr( $return[1], 0, 9 ) == '<![CDATA[' ) { 469 if ( strpos( $return[1], ']]]]><![CDATA[>' ) !== false ) { 470 preg_match_all( '|<!\[CDATA\[(.*?)\]\]>|s', $return[1], $matches ); 471 $return = ''; 472 foreach( $matches[1] as $match ) 473 $return .= $match; 474 } else { 475 $return = preg_replace( '|^<!\[CDATA\[(.*)\]\]>$|s', '$1', $return[1] ); 476 } 477 } else { 478 $return = $return[1]; 479 } 469 480 $return = $wpdb->escape( trim( $return ) ); 470 481 } else { -
wordpress-importer/trunk/wordpress-importer.php
r485059 r501867 6 6 Author: wordpressdotorg 7 7 Author URI: https://wordpress.org/ 8 Version: 0.5 8 Version: 0.5.1 9 9 Text Domain: wordpress-importer 10 10 License: GPL version 2 or later - https://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 37 37 if ( class_exists( 'WP_Importer' ) ) { 38 38 class WP_Import extends WP_Importer { 39 var $max_wxr_version = 1. 1; // max. supported WXR version39 var $max_wxr_version = 1.2; // max. supported WXR version 40 40 41 41 var $id; // WXR attachment ID
Note: See TracChangeset
for help on using the changeset viewer.