Permalink
Browse files

Fix sanitize_text_field() issue with some UTF-8 characters, fixes #11…

…528 for 2.9.1

git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
azaozz
azaozz committed Dec 23, 2009
1 parent a1100b8 commit 2a5bfcc97295983c79fc29456ab43ce2577c15fb
Showing with 2 additions and 2 deletions.
  1. +2 −2 wp-includes/formatting.php
@@ -2810,7 +2810,7 @@ function wp_strip_all_tags($string, $remove_breaks = false) {
$string = strip_tags($string);
if ( $remove_breaks )
- $string = preg_replace('/\s+/', ' ', $string);
+ $string = preg_replace('/[\r\n\t ]+/', ' ', $string);
return trim($string);
}
@@ -2836,7 +2836,7 @@ function sanitize_text_field($str) {
$filtered = wp_pre_kses_less_than( $filtered );
$filtered = wp_strip_all_tags( $filtered, true );
} else {
- $filtered = trim( preg_replace('/\s+/', ' ', $filtered) );
+ $filtered = trim( preg_replace('/[\r\n\t ]+/', ' ', $filtered) );
}
$match = array();

0 comments on commit 2a5bfcc

Please sign in to comment.