Formatting: Pass the blog charset to htmlspecialchars so that we don't eat non-UTF8 strings in PHP 5.4
Fixes #23688 git-svn-id: https://develop.svn.wordpress.org/trunk@23685 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4ff35bd528
commit
6c937208e7
|
@ -2523,7 +2523,7 @@ function wp_richedit_pre($text) {
|
|||
|
||||
$output = convert_chars($text);
|
||||
$output = wpautop($output);
|
||||
$output = htmlspecialchars($output, ENT_NOQUOTES);
|
||||
$output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) );
|
||||
|
||||
return apply_filters('richedit_pre', $output);
|
||||
}
|
||||
|
@ -2541,7 +2541,7 @@ function wp_richedit_pre($text) {
|
|||
*/
|
||||
function wp_htmledit_pre($output) {
|
||||
if ( !empty($output) )
|
||||
$output = htmlspecialchars($output, ENT_NOQUOTES); // convert only < > &
|
||||
$output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); // convert only < > &
|
||||
|
||||
return apply_filters('htmledit_pre', $output);
|
||||
}
|
||||
|
@ -2728,7 +2728,7 @@ function esc_attr( $text ) {
|
|||
* @return string
|
||||
*/
|
||||
function esc_textarea( $text ) {
|
||||
$safe_text = htmlspecialchars( $text, ENT_QUOTES );
|
||||
$safe_text = htmlspecialchars( $text, ENT_QUOTES, get_option( 'blog_charset' ) );
|
||||
return apply_filters( 'esc_textarea', $safe_text, $text );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue