Changeset 10392
- Timestamp:
- 01/21/2009 06:51:48 PM (16 years ago)
- Location:
- branches/2.7
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.7/wp-admin/import/blogger.php
r9933 r10392 551 551 552 552 // Clean up content 553 $post_content = preg_replace ('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_content);553 $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content); 554 554 $post_content = str_replace('<br>', '<br />', $post_content); 555 555 $post_content = str_replace('<hr>', '<hr />', $post_content); … … 604 604 605 605 // Clean up content 606 $comment_content = preg_replace ('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $comment_content);606 $comment_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $comment_content); 607 607 $comment_content = str_replace('<br>', '<br />', $comment_content); 608 608 $comment_content = str_replace('<hr>', '<hr />', $comment_content); -
branches/2.7/wp-admin/import/blogware.php
r9903 r10392 90 90 91 91 // Clean up content 92 $post_content = preg_replace ('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_content);92 $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content); 93 93 $post_content = str_replace('<br>', '<br />', $post_content); 94 94 $post_content = str_replace('<hr>', '<hr />', $post_content); … … 130 130 131 131 // Clean up content 132 $comment_content = preg_replace ('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $comment_content);132 $comment_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $comment_content); 133 133 $comment_content = str_replace('<br>', '<br />', $comment_content); 134 134 $comment_content = str_replace('<hr>', '<hr />', $comment_content); -
branches/2.7/wp-admin/import/livejournal.php
r9903 r10392 71 71 72 72 // Clean up content 73 $post_content = preg_replace ('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_content);73 $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content); 74 74 $post_content = str_replace('<br>', '<br />', $post_content); 75 75 $post_content = str_replace('<hr>', '<hr />', $post_content); … … 107 107 108 108 // Clean up content 109 $comment_content = preg_replace ('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $comment_content);109 $comment_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $comment_content); 110 110 $comment_content = str_replace('<br>', '<br />', $comment_content); 111 111 $comment_content = str_replace('<hr>', '<hr />', $comment_content); -
branches/2.7/wp-admin/import/rss.php
r9903 r10392 104 104 105 105 // Clean up content 106 $post_content = preg_replace ('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_content);106 $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content); 107 107 $post_content = str_replace('<br>', '<br />', $post_content); 108 108 $post_content = str_replace('<hr>', '<hr />', $post_content); -
branches/2.7/wp-admin/import/wordpress.php
r10157 r10392 382 382 383 383 $post_excerpt = $this->get_tag( $post, 'excerpt:encoded' ); 384 $post_excerpt = preg_replace ('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_excerpt);384 $post_excerpt = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_excerpt); 385 385 $post_excerpt = str_replace('<br>', '<br />', $post_excerpt); 386 386 $post_excerpt = str_replace('<hr>', '<hr />', $post_excerpt); 387 387 388 388 $post_content = $this->get_tag( $post, 'content:encoded' ); 389 $post_content = preg_replace ('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_content);389 $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content); 390 390 $post_content = str_replace('<br>', '<br />', $post_content); 391 391 $post_content = str_replace('<hr>', '<hr />', $post_content); -
branches/2.7/wp-includes/formatting.php
r10391 r10392 1306 1306 } else { 1307 1307 $subject = str_replace('_', ' ', $matches[2]); 1308 /** @todo use preg_replace_callback() */ 1309 $subject = preg_replace('#\=([0-9a-f]{2})#ei', "chr(hexdec(strtolower('$1')))", $subject); 1308 $subject = preg_replace_callback('#\=([0-9a-f]{2})#i', create_function('$match', 'return chr(hexdec(strtolower($match[1])));'), $subject); 1310 1309 return $subject; 1311 1310 } -
branches/2.7/wp-includes/kses.php
r10150 r10392 395 395 */ 396 396 function wp_kses_split($string, $allowed_html, $allowed_protocols) { 397 return preg_replace('%((<!--.*?(-->|$))|(<[^>]*(>|$)|>))%e', 398 "wp_kses_split2('\\1', \$allowed_html, ".'$allowed_protocols)', $string); 397 global $pass_allowed_html, $pass_allowed_protocols; 398 $pass_allowed_html = $allowed_html; 399 $pass_allowed_protocols = $allowed_protocols; 400 return preg_replace_callback('%((<!--.*?(-->|$))|(<[^>]*(>|$)|>))%', 401 create_function('$match', 'global $pass_allowed_html, $pass_allowed_protocols; return wp_kses_split2($match[1], $pass_allowed_html, $pass_allowed_protocols);'), $string); 399 402 } 400 403 … … 1000 1003 */ 1001 1004 function wp_kses_decode_entities($string) { 1002 $string = preg_replace ('/&#([0-9]+);/e', 'chr("\\1")', $string);1003 $string = preg_replace ('/&#[Xx]([0-9A-Fa-f]+);/e', 'chr(hexdec("\\1"))', $string);1005 $string = preg_replace_callback('/&#([0-9]+);/', create_function('$match', 'return chr($match[1]);'), $string); 1006 $string = preg_replace_callback('/&#[Xx]([0-9A-Fa-f]+);/', create_function('$match', 'return chr(hexdec($match[1]));'), $string); 1004 1007 1005 1008 return $string; -
branches/2.7/wp-includes/post-template.php
r10270 r10392 224 224 } 225 225 if ( $preview ) // preview fix for javascript bug with foreign languages 226 $output = preg_replace ('/\%u([0-9A-F]{4,4})/e', "'&#'.base_convert('\\1',16,10).';'", $output);226 $output = preg_replace_callback('/\%u([0-9A-F]{4})/', create_function('$match', 'return "&#" . base_convert($match[1], 16, 10) . ";";'), $output); 227 227 228 228 return $output;
Note: See TracChangeset
for help on using the changeset viewer.