mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-02 05:31:25 +01:00
Fix sanitize_text_field() issue with some UTF-8 characters, fixes #11528 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@12499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8837d88bfe
commit
2128c3f4db
@ -2810,7 +2810,7 @@ function wp_strip_all_tags($string, $remove_breaks = false) {
|
|||||||
$string = strip_tags($string);
|
$string = strip_tags($string);
|
||||||
|
|
||||||
if ( $remove_breaks )
|
if ( $remove_breaks )
|
||||||
$string = preg_replace('/\s+/', ' ', $string);
|
$string = preg_replace('/[\r\n\t ]+/', ' ', $string);
|
||||||
|
|
||||||
return trim($string);
|
return trim($string);
|
||||||
}
|
}
|
||||||
@ -2836,7 +2836,7 @@ function sanitize_text_field($str) {
|
|||||||
$filtered = wp_pre_kses_less_than( $filtered );
|
$filtered = wp_pre_kses_less_than( $filtered );
|
||||||
$filtered = wp_strip_all_tags( $filtered, true );
|
$filtered = wp_strip_all_tags( $filtered, true );
|
||||||
} else {
|
} else {
|
||||||
$filtered = trim( preg_replace('/\s+/', ' ', $filtered) );
|
$filtered = trim( preg_replace('/[\r\n\t ]+/', ' ', $filtered) );
|
||||||
}
|
}
|
||||||
|
|
||||||
$match = array();
|
$match = array();
|
||||||
|
Loading…
Reference in New Issue
Block a user