encodeURLPath

Encodes URL path. It escapes all illegal or ambiguous characters keeping all "/" symbols.