for URLs replace spaces with %20 instead of just taking care to not wrap them