The only thing this kind of url checking doesn't cover is protocol relative urls (`//foo.com`) but I'm okay with that.