This seems very strange. Why not always use `urlparse`, and then use `StaticContent` to convert just the url part of it. (Basically, the conversion in the case w/ params and the case w/o params looks entirely different, and that seems suspect to me).