Subscribe to
Posts
Comments
NSLog(); Header Image

WordPress 2.0.4 Import Removes img tag Formatting?

I noticed today while doing some editing here on the WordPress version of NSLog(); that some of my image data was removed from my entries. Specifically, class="" and style="".

I default my images in my blog to right-aligned and borderless. Occasionally I specify class="bordered" and style="float: none; margin-left: 0;" as the image and entry warrant.

This code, which appeared just fine in my MovableType export, was stripped when imported into WordPress.

In talking over AIM with Jesper about this problem, he said that it appears to be a result of the add_filter('content_save_pre', 'balanceTags', 50);" code in wp-includes/functions-formatting.php, balanceTags.

5 Responses to "WordPress 2.0.4 Import Removes img tag Formatting?"

  1. I don't know about import (except to know I had a few things to fix), but the formatting of the site look great. Clean and simple.

  2. Thank you for documenting this problem so well. I have opened a ticket in our WordPress bug tracker: #3290: Importer strips img class and style

  3. [...] Tag-Eating Import This one cost me hours and hours of repair time. Fortunately, someone filed a bug on my behalf and before I’d gotten around to it, so I hope it’s fixed in later versions. [...]

  4. If you 100% trust the content, you can work around this bug by commenting out: kses_init_filters(); // Always filter imported data with kses in wp-admin/admin.php.

  5. [...] Import This one cost me hours and hours of repair time. Fortunately, someone filed a bug on my behalf and before [...]


Trackback URI | Comments RSS

Leave a Reply

Please abide by the comment policy. Valid HTML includes: <blockquote><p>, <em>, <strong>, <ul>, <ol>, and <a href>. Please use the "Quote Me" functionality to quote comments.