Regex fix. Props tellyworth. fixes #4452

git-svn-id: http://svn.automattic.com/wordpress/trunk@5718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-06-16 02:09:08 +00:00
parent e30a9ba012
commit 9fbb55032a
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;
}