Adding Videos, JavaScript, and Other Goodies to Posts in WordPress MU
Some of you may recall my earlier post Adding JavaScript to WordPress Posts without a Plugin. In that post, I talked about how to add JavaScript for, say, embedding a video without having WordPress “sanitize” your code… and without any plugins!
WordPress MU, the version of WordPress that allows multiple blogs to be run under one WP installation, uses a different content sanitizer. In fact, it’s so seriously anal that it blows away not only JavaScript, but all kinds of other HTML tags in your posts that the regular WP leaves untouched! Bad juju.
In the case of WP MU, the best solution that I could find does include a plugin – but you can write it yourself in about 10 seconds. In writing the plugin yourself, you will also know how to maintain it yourself. Even if you don’t know much about PHP, this one’s a piece of cake!
So, here’s how to convince WordPress MU to play nice with the HTML in your posts…
Recent Comments