Disabling HTML/kses filtering in WordPress Multisite

Last week, I learned the hard way that WordPress Multisite secretly strips out embedded videos and other HTML objects. With a single WordPress instance, you can easily import WordPress eXtended RSS files containing YouTube videos, iframes, etc. Then, when creating or editing a post, it’s simple to drop embed code in the body text, hit publish, and move on with your life. In WordPress Multisite, much of this HTML is stripped out by default.

If you aren’t migrating content into your new WordPress Multisite instance, a common fix to this problem is a plugin called Unfiltered MU. Unfortunately, it wasn’t a solution for me. It doesn’t work reliably, takes a roundabout approach to the problem by temporarily adding user permissions, and limits the fix to administrators and editors.

Because the J-School network is a controlled environment, I’m fine with giving authors and contributors the ability to embed videos. I put together a quick plugin called Unfiltered HTML which disables the kses filters when activated and declared mission accomplished.

Whoops, not entirely. Thanks to Andrew Nacin, last night I discovered that there’s actually a hard-coded call to the kses filter when importing into Multisite. This means all of your glorious embedded videos will be stripped out unless you comment out that line. Andrew committed a fix, though, which adds a method for disabling the filter.

Today’s project? Going through all of the content I imported into a couple dozen sites and manually adding the missing embeds by hand.