Maybe decodeURIComponent around urlPath?