A fair set of unit tests have been written for the UrlFilter. Finish those Then consider replacing that with the url catching thing in common internals that David suggested. If not, port the existing code to a plugin.
*** This bug has been marked as a duplicate of bug 305725 ***