escaping url segment prior to query