Uninstalling the Sanitize plugin

Movable Type 2.6 incorporated my Sanitize plugin. So if you've upgraded to MT 2.6, you no longer need the plugin files. So here's what you would do to remove them.

Again, these steps are only necessary if 1) you installed the Sanitize plugin on your pre-MT 2.6 blog; 2) you've since upgraded to Movable Type 2.6 or later.

  1. Locate the 'sanitize.pl' in your Movable Type plugins directory. Delete that file.
  2. Locate the 'sanitize.pm' file in your extlib/bradchoate directory. Delete that file.

Now, you may be wondering what to do about the sanitize="..." attributes you have scattered all over the place. Well, MT now has a 'Sanitize' field in the blog preferences you can use to define the allowable tags/attributes. This will be applied to all comments, foreign trackback data and so forth. If you use this preference field, you no longer need to add the 'sanitize' attribute to your MT tags. You can still use the 'sanitize' attribute if you ever want to override the default settings.

There is also a new mt.cfg configuration setting named "GlobalSanitizeSpec". If you assign your list of tags/attributes here, this will be used for any blogs that don't define their own Sanitize settings.

For more information about the Sanitize function in Movable Type 2.6, I invite you to read the fine manual.


TrackBack URL for this entry:


David Raynes said:

Is it just me, Brad, or should those two filenames be the other way 'round? :)

Brad Author Profile Page said:

Whatever do you mean? They look fine to me! :-)

nick said:

i guess it doesn't particularly matter, but are there any ill effects of leaving your plugin files where they're at? because i'm too lazy to delete them right now.

Brad Author Profile Page said:

I haven't heard or seen any ill effects of leaving the files there. My guess is that if you do, the old code will still be used to actually strip the tags. Since it isn't aware of the MT preference fields that were introduced with 2.6, those preferences will probably not be used. So don't use the "sanitize='1'" technique until you've removed the old plugin files.


This article was published on February 19, 2003 1:37 PM.

The article previously posted was Oh the servers, they are a changin'....

The next article is E-mail needs a kick to the head.

Many more can be found on the home page or by looking through the archives.

Powered by Movable Type