Unexpected, extra characters appear on my site

In some rare cases you may see some junk characters on your website, either while previewing a page from within Sandvox or on the published page.

image:junk markup.png

There are a number of possible reasons for this:

If you are putting PHP code into your website, it is to be expected that you will see artifacts of it in the Sandvox preview. When you publish your site, the PHP code should be properly interpreted; if it is not, check with the documentation for your Host to understand what is wrong.

Troubleshooting can take a bit of exploration. First of all, see if the extra characters are on only one page, or on your entire site. This will help you determine whether the characters come from the content or code injection of an individual page, or whether it is a site-wide area.

If the junk appears at the top or bottom of an object, or at the top or bottom of the main page content area, then it is probably related to the contents of the object/page. Try selecting Edit Raw HTML… and finding the offending characters.

If the junk appears at the very top of the page or the very bottom, it is probably due to code injection. It may also be improperly formatted Google Site Verification or Google Analytics code. Check the Code Injection window for the page and/or site, and check the Google tab of the Document Inspector and verify that the correct data are there.

If you are still having trouble finding the source, choose View → Web View → HTML Source and look for the characters there. The proximity to other elements on the page will usually help you get a clue where the characters are coming from.


Keywords: junk, character, characters, encoding, strange, unusual, wrong, letter, letters, lettering, text, encode, code, coding, weird, junk

How can we improve this page? Let us know.