Better method of cusomizing url encoding