[wp-hackers] MT import issues... stripping HTML

Peter Westwood peter.westwood at ftwr.co.uk
Mon Aug 14 12:02:10 GMT 2006

On Mon, August 14, 2006 12:02 pm, Lee Kelleher wrote:
> ... long time listener, first time caller ...
> I was asked by a client to migrate their existing Movable Type blog across
> to WP, so no problem I thought, I'll just use the MT import tool.
> I got all the content exported from MT ok... even imported it in to WP ok
> -
> but then I noticed that certain HTML tags had been stripped out -
> specifically the OBJECT/EMBED tags (for flash movies).
> Also they had some JavaScript blocks in their blog postings, (bad form, I
> know).
> I know that the rouge HTML tags were stripped out by 'wp_filter_kses'
> because they weren't in the '$allowedposttags' array set.
> My question is this... is there any way I can re-import the MT content
> without having that HTML stripped out?  Does the MT Import code ignore
> that
> I was logged in as an Administrator and have 'unfiltered_html' caps?
> I appreciate any advice/feedback that you guys (and gals) have.

A quick scan of the 2.0.4 importer code leads me to the following

1) The MT importer allows you to map the MT users onto existing or new
WordPress users.
2) The posts are entered with the rights of the new/existing wordpress users
3) If you ask for new users they are created with the default rights
according to the "New User Default Role" on the General Options page.

Therefore you have two options:
1) Create a user before import for each MT User and make them an Editor
(or give them the unfilter_html cap manually)
2) Set the Default User Role to Editor

Hope this helps

Peter Westwood <peter.westwood at ftwr.co.uk>

More information about the wp-hackers mailing list