Movable Type plugin: ResolveURLs

I noticed the other day that some of my RSS feeds did not validate, because they contained relative URLs. In fact, it occured to me that using relative URLs in weblog entries in general can be dangerous, because an entry can appear in multiple locations, each with a different base (using absolute paths fixes this, although not the RSS feeds, since those need absolute URLs).

So I wrote an MT plugin that adds a global filter resolve_urls. Enabling this in a template tag goes through and makes all links absolute, resolving any relative URLs against the site URL of your weblog. I’m using it now wherever <$MTEntryBody$> appears on my site, both in HTML and RSS.