Fix Wordpress Warning: htmlspecialchars() [function.htmlspecialchars]: charset 'UTF-7' not supported, assuming iso-8859-1 in ...
<?php
http://www.marketingextremist.com/how-to-fix-htmlspecialchars-error-after-updating-to-wordpress-3-6-579/
http://wpgyan.com/resolve-warning-htmlspecialchars-charset-utf-7-not-supported-assuming-utf-8/
1) You Can see the changed charset in WP admin Dashboard in Settings => Reading.
- Change to UTF-8 if it was changed , else proceed with (2)
2)
Log in to your FTP or Cpanel and go to the /wp-includes folder which could be found within your root directory.
Open the file formatting.php
Find the line 2751 and turn off the warnings by placing @” before the function:
before: $safe_text = htmlspecialchars( $text, ENT_QUOTES, get_option(‘blog_charset’) );
after: $safe_text = @htmlspecialchars( $text, ENT_QUOTES, get_option(‘blog_charset’) );
LINE: 3973
function esc_textarea( $text ) {
// supress the warning
// $safe_text = htmlspecialchars( $text, ENT_QUOTES, get_option( 'blog_charset' ) ); change this
$safe_text = @htmlspecialchars( $text, ENT_QUOTES, get_option(‘blog_charset’) );
/**
* Filters a string cleaned and escaped for output in a textarea element.
*
* @since 3.1.0
*
* @param string $safe_text The text after it has been escaped.
* @param string $text The text prior to being escaped.
*/
return apply_filters( 'esc_textarea', $safe_text, $text );
}