encodeURLPathPart

Encodes URL path segment. It escapes all illegal or ambiguous characters