Regex fix. Props tellyworth. fixes #4452

git-svn-id: https://develop.svn.wordpress.org/trunk@5718 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-06-16 02:09:08 +00:00
parent 5bac944f80
commit 724be536b6
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class WP_Import {
function get_tag( $string, $tag ) {
global $wpdb;
preg_match("|<$tag.*?>(.*?)</$tag>|is", $string, $return);
$return = preg_replace('|<!\[CDATA\[(.*)\]\]>|', '$1', $return[1]);
$return = preg_replace('|^<!\[CDATA\[(.*)\]\]>$|s', '$1', $return[1]);
$return = $wpdb->escape( trim( $return ) );
return $return;
}