WordPress 2.0.4 Import Removes img tag Formatting?
Posted October 25th, 2006 @ 04:14pm by Erik J. Barzeski
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
.
Posted 25 Oct 2006 at 5:47pm #
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.
Posted 27 Oct 2006 at 5:25pm #
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
Posted 28 Oct 2006 at 9:31pm #
[...] 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. [...]
Posted 06 Dec 2006 at 5:03pm #
If you 100% trust the content, you can work around this bug by commenting out:
kses_init_filters(); // Always filter imported data with kses
inwp-admin/admin.php
.Posted 10 Jun 2007 at 1:31pm #
[...] Import This one cost me hours and hours of repair time. Fortunately, someone filed a bug on my behalf and before [...]