add percent encoding for path in url