WordPress: DT, DD, DL, Class=”[object]” Appearing in Post Content – Haunted WYSIWYG?

One of clients recently wrote me about some strange formatting appearing on a WordPress site.  Example of the strange HTML follows:

Example
<p id=”[object]”>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et nunc vitae nibh semper luctus.</p>
<p id=”[object]”>Sed et nunc vitae nibh semper luctus. Cras gravida semper magna, sit amet varius purus dictum non. Cras eget dolor est. Vestibulum dui ligula, adipiscing eget vestibulum dignissim, congue sed turpis.</p>

<div id=”[object]” class=”mceTemp mceIEcenter”><dl id=”attachment_1234″ class=”wp-caption aligncenter” style=”width: 510px;”><dt class=”wp-caption-dt”><a href=”http://example.com/wp-content/uploads/2011/05/example.jpg”><img class=”size-full wp-image-1234″ title=”etc” src=”http://example.com/wp-content/uploads/2011/05/example.jpg” alt=”Suspendisse erat tortor, auctor sit amet dapibus a, sodales non massa. Integer viverra ornare purus non sodales.” width=”500″ height=”281″ /></a></dt><dd class=”wp-caption-dd”>Suspendisse erat tortor, auctor sit amet dapibus a, sodales non massa. Integer viverra ornare purus non sodales.</dd></dl></div>
<p id=”[object]”>

<p id=”[object]”> </p>
<p id=”[object]”> </p>

To summarize the oddities:

  • What normally would be <p class=”wp-caption-text”> becomes <dd class=”wp-caption-dd”>
  • image’s link tag is surrounded by <dt class=”wp-caption-dt”>
  • ““ becomes <dl id=”attachment_1234″>
  • the whole thing gets wrapped in a <div id=”[object]”>
  • and paragraph tags become <p id=”[object]”>

I suspect this has to do with TinyMCE‘s built-in on-the-fly code re-writing going haywire somehow. Incidentally, the person who was having these issues was running a pretty old version: WordPress 2.6.3

Anyone know what this is all about?  Leave a comment and together we’ll fix the world (or at least help others with a very frustrating bug)

 

If you found this information helpful, please consider making a donation. No amount is too small.
paypal.me/andrewapeterson





Bitcoin Donation Address:
1KAAN2ULpdZ2cjegDHYTXP1qXGLUybs5H6

One Reply to “WordPress: DT, DD, DL, Class=”[object]” Appearing in Post Content – Haunted WYSIWYG?”

  1. I use WordPress 3.2.1 and I have the same issue, a lot of dl and dt tags. As a result, my posts were being rendered empty. I’m cleaning the code by myself, maybe coming from TinyMCE or by the Fast Insert Image plugin… I’m not sure.

Leave a Reply

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