Changeset 5249
- Timestamp:
- 04/12/2007 02:58:41 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/wordpress.php
r5247 r5249 36 36 37 37 function get_tag( $string, $tag ) { 38 global $wpdb; 38 39 preg_match("|<$tag.*?>(.*?)</$tag>|is", $string, $return); 39 $return = addslashes( trim( $return[1] ) );40 $return = $wpdb->escape( trim( $return[1] ) ); 40 41 return $return; 41 42 } … … 337 338 $key = $this->get_tag( $p, 'wp:meta_key' ); 338 339 $value = $this->get_tag( $p, 'wp:meta_value' ); 340 $value = stripslashes($value); // add_post_meta() will escape. 339 341 add_post_meta( $post_id, $key, $value ); 340 342 } }
Note: See TracChangeset
for help on using the changeset viewer.