Ticket #1162: wordpress_importer_get_tag_fix.patch
| File wordpress_importer_get_tag_fix.patch, 694 bytes (added by snarfed, 22 months ago) |
|---|
-
trunk/wordpress-importer.php
69 69 70 70 function get_tag( $string, $tag ) { 71 71 global $wpdb; 72 preg_match("|<$tag .*?>(.*?)</$tag>|is", $string, $return);73 if ( isset($return[ 1]) ) {74 $return = preg_replace('|^<!\[CDATA\[(.*)\]\]>$|s', '$1', $return[ 1]);72 preg_match("|<$tag( +.*)?>(.*?)</$tag>|is", $string, $return); 73 if ( isset($return[2]) ) { 74 $return = preg_replace('|^<!\[CDATA\[(.*)\]\]>$|s', '$1', $return[2]); 75 75 $return = $wpdb->escape( trim( $return ) ); 76 76 } else { 77 77 $return = '';
