Support » Fixing WordPress » Warning code with posts

  • Resolved glajoe


    My name is Joe Palmer. After updating to latest WP earlier this week I noticed the following warning with new and existing posts
    Warning: htmlspecialchars() [function.htmlspecialchars]: charset `UTF-7′ not supported, assuming iso-8859-1 in /home/gayleagu/public_html/wordpress/wp-includes/formatting.php on line 2751

    I have looked at the code in the above referenced file on line 2751 and is pasted below. Line 2751 being the line marked between 2 sets of asterisks (added here)

    ‘function esc_textarea( $text ) {
    **$safe_text = htmlspecialchars( $text, ENT_QUOTES, get_option( ‘blog_charset’ ) );**
    return apply_filters( ‘esc_textarea’, $safe_text, $text );’

    Sometime in February I added a widget called “Defend Internet Privacy” and discovered a few days later that my site had been hacked by a Turkish hacker. I deleted the widget (though the empty folder still exists), and cleaned up all the readily apparent things the hacker had done, knowing that I probably hadn’t. Since then, I’ve had to be careful to avoid any kind of special characters.

    I’ve run the exploit scanner and many of the items that pop up refer to a hidden file. Here are the first two items:

    hashes-3.6.php missing
    The file containing hashes of all WordPress core files appears to be missing; modified core files will no longer be detected and a lot more suspicious strings will be detected

    Unknown file found in wp-includes/ or wp-admin/ directory.

    In addition, permalinks now read like this:

    instead of like this:

    My site is It’s for LGBT comic book fans and is not erotic or porn.

    My knowledge of and skills with WP are still basically novice/ noob. Any advice and help will be greatly appreciated.

    Thank you,

Viewing 8 replies - 1 through 8 (of 8 total)
  • I had this issue and under Settings -> Reading there is a setting that said utf-7. When I changed it to utf-8 the setting disappeared.

    This was really helpful. Thanks!

    Great thank you as well!!!

    Thank you very much the tip and your speedy reply. That did solve my problem too.

    I apologize for not thanking you sooner. Personal and hellish circumstances.

    Best wishes to you.


    Thank you Jacob! Been putting off looking for a solution for this issue for some time. I thought it was going to be a much more complicated fix. Thanks a ton for sharing.



    This helped to remove the error in most of the places it appeared, but it is still showing in the header of one page: Could this be cached and will disappear once the cache is cleared? It still shows when I look at the page in a different browser.

    To avoid this happening again in future I am trying to determine if it was because my client edited the page on her iPhone or on her netbook (or maybe her desktop) with an outdated version of IE. Any ideas?



    Hi Ann,
    For a starting point here are errors found at:
    You can upload your page code and it checks it.

    [Error report moderated. There’s really no need to post that in here. Just post a link to the report instead.]



    Thanks, this helped me too!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Warning code with posts’ is closed to new replies.