I'm having a strange issue that I've never seen before. I moved a WordPress site from Siteground over to GoDaddy a few days ago, and now the site appears to have problems displaying HTML entities in certain cases. For example, on the 404 page, the title prints to the source code as:

<h1 class="page-title">Oops! That page can&amp;rsquo;t be found.</h1>

Causing it to display on the page as "Oops! That page can&rsquo;t be found."

As you can see, for some reason the ampersand that is part of the HTML entity &rsquo; is being encoded first, breaking the actual HTML entity. This also seems to happen in my custom taxonomy's terms, where it prints ampersands like &amp;amp;amp; and even in the WordPress admin interface where it prints things like &larr; instead of the left facing arrow (←).

I tried editing the text in the taxonomy terms that were experiencing issues and the issue persisted. When I hit update again leaving the malformed &amp;amp;amp; in place, it added three more amp;amp;amp;s to the end of the chain.

I looked in the PHP logs and found this little gem, over and over which I think is related:

PHP Warning:  in_array() expects parameter 2 to be array, null given in ...wp-includes/kses.php on line 1417

But it's really not a very helpful or specific error.

Even stranger, the problems aren't happening everywhere. When I made a new post and put some HTML entities into the content, they displayed the proper characters as expected.

Has anyone seen something like this before? Most of my searches have just brought up examples of it happening on sites with PHP error display turned on. The stuff I've run across seems to suggest that it could be an issue with the encoding, but I don't really know. I don't think it's a problem with the theme or any of the plugins, because this problem isn't happening on the site at all on the Siteground server which has the exact same code and database.

Any suggestions towards fixing this issue or at least troubleshooting it would be much appreciated. Thanks!

Edit: The entity code appears to all users in the front end, and the issue with the extra amp;s being added on to taxonomy terms are happening when I edit the terms as an administrator.

  • Does this problem go away if a super admin ( multisite) or administrator(non-multisite) tries to do it? But persists if you're an editor/author?
    – Tom J Nowell
    Commented Jul 25, 2018 at 23:15

1 Answer 1


Turns out that this specific issue was caused by someone on the IT team who wasn't very experienced with WordPress adding some code that they found on a poorly written WordPress blog that literally starts out with an unmarked example of what not to do.

According to the IT team, this line added to wp-config.php was apparently the cause of the issue:

define( 'CUSTOM_TAGS', true );

There are two morals to this story:

  1. Always read WordPress blogs critically and verify that what you are doing is really the BEST solution, not just a solution.
  2. Never assume that others will be careful about trusting random things they read on the internet. This includes WordPress blogs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.