Search code examples
javascripturlencode

JavaScript: What characters are not encoded by encodeURIComponent?


I'm writing my own function in a different language, and I want it to provide identical results if possible.


Solution

  • You can find information in the MDC documentation:

    encodeURIComponent escapes all characters except the following:
    alphabetic, decimal digits, - _ . ! ~ * ' ( )