Move URL quoting to a more sensible place.