What’s that strange code on my website?

If you’re using WordPress, you might occasionally see something like this when in Explorer:

<!--[if !supportEmptyParas]--> <!--[endif]-->

It’s a conditional comment, and it won’t show up on the page in Firefox or other browsers, which think they are regular comments and hide them.

Okay, fine, so where did it come from, and how do you get rid of it?

The WordPress Edit Post (or Edit Page) page has two tabs for viewing the main content, ‘Visual’ and ‘HTML’. The text above would show up as a blank line when viewing the content using the ‘Visual’ tab. But the coding is visible when clicking on the HTML tab. In fact, you might see something like this:

<p class="MsoNormal" style="text-indent: 0.5in;"><!--[if !supportEmptyParas]--> <!--[endif]--></p>

Any time you see something w/ class=”MsoNormal” (or class=”MsoAnything”), that’s coming from Word. You have pasted the text from Word, and something got garbled along the way.

To avoid this, use the ‘Paste from Word’ button. Rather than pasting directly into the text box, click on the little button that looks like a clipboard with the letter ‘W’. This will bring up a dialogue box into which you paste the text, and it is then cleaned up when actually inserted. This SHOULD work to remove cruft like this.

But if it doesn’t, use the ‘HTML’ tab to review your content and find the offending code.

Happy Blogging!


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *