Not a developer? Go to

Plugin and Theme Directory

SanitizeBlogs 2 v1.2.2

By François Nonnenmacher
Posted September 27, 2010, in Editing.


Specify HTML tags and attributes allowed in entry/page fields based upon system or blog settings.

Functions in a similar manner as, but is distinct from, the GlobalSanitizeSpec configuration directive.

A typical use case of this plugin is to cleanup the tag soup introduced by authors copying texts from Microsoft Word and pasting them in the rich text editor. Newest versions of MS Word will typically introduce invalid HTML code that can break a site layout and CSS styles. Also, and contrary to the MT sanitization default behavior, SanitizeBlogs 2 can allow the use of white-listed javascript events (such as the 'onclick' event generated by the Asset Manager for full-size images popups). You should only use this feature on blogs which authors you trust.

SanitizeBlogs 2 is a variant of the mt-plugin-SanitizeBlogs by Six Apart. While the Six Apart version sanitizes blogs based upon a blog URL prefix (useful for blogs published under the Community Platform), the present variant is more useful for a blog farm where you want all blogs to be sanitized with the ability to refine or prevent the sanitization for selected blogs.


Movable Type versions:



Jay on October 26, 2010, 9:45 p.m. Reply

I’m using this plugin with MT 5.03 and it works great. Strips all of the crap that Word tends to add to rich text.

DavidRemer on March 5, 2011, 5:19 a.m. Reply

I loaded this plugin, and it worked as advertised. However, I had a need to retain onclick javascript HTML in my entries for images, and contacted the Plugin’s author about this.

Amazingly, the author Francois, was very approachable, and reworked the plugin to accommodate my need. I was truly impressed. Now, I am able to sanitize those MS Wordprocessing codes without losing my image enlargement functionality for entries.

Great plug-in. Exceptional plug-in author.

George on June 25, 2012, 11:42 a.m. Reply

This is so useful! So glad I found it!

Rybalka on June 27, 2012, 5:20 a.m. Reply

Francois, you are my hero!)) I’m pretty new with MT 5.x but your plugin is awesome.

Eddie Craig on July 13, 2012, 9:43 p.m. Reply

Yeap, I have this problem with MS Word. When I paste a text from Word to my cms it gives me extra code which is visible on the screen. I have to remove it and I also have to correct the empty spaces.

Leave a Comment

François Nonnenmacher

Founder of Ubiquitic, a web consultancy based in Noumea, New Caledonia. François has more than 10 years of experience with Movable Type (from the time it was just Mena and Benjamin Trott in a garage!) and has implemented it in small and big business sites, such as the blogs of the Capgemini Group, as well as the blogs of Le Figaro, the first online news site in France.

Twitter: @François Nonnenmacher