It'd be great to get away from this hand conversion and just use url quote or some such, but that's beyond the scope of this epic.