Ticket #23688: htmlspecialchars-with-charset.diff
| File htmlspecialchars-with-charset.diff, 1.1 KB (added by westi, 3 months ago) |
|---|
-
wp-includes/formatting.php
2496 2496 2497 2497 $output = convert_chars($text); 2498 2498 $output = wpautop($output); 2499 $output = htmlspecialchars($output, ENT_NOQUOTES );2499 $output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); 2500 2500 2501 2501 return apply_filters('richedit_pre', $output); 2502 2502 } … … 2514 2514 */ 2515 2515 function wp_htmledit_pre($output) { 2516 2516 if ( !empty($output) ) 2517 $output = htmlspecialchars($output, ENT_NOQUOTES ); // convert only < > &2517 $output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); // convert only < > & 2518 2518 2519 2519 return apply_filters('htmledit_pre', $output); 2520 2520 } … … 2702 2702 * @return string 2703 2703 */ 2704 2704 function esc_textarea( $text ) { 2705 $safe_text = htmlspecialchars( $text, ENT_QUOTES );2705 $safe_text = htmlspecialchars( $text, ENT_QUOTES, get_option( 'blog_charset' ) ); 2706 2706 return apply_filters( 'esc_textarea', $safe_text, $text ); 2707 2707 } 2708 2708
