I am referencing an API for developing an application for a social platform called Mixi. I am stuck at a point where it says the following: For a parameter to be passed correctly to payment API, the string must be URI escaped according to the following rules:
All parameter names and values are escaped using the [RFC3986] percent-encoding (%xx) mechanism. Characters not in the unreserved character set ([RFC3986] section 2.3) MUST be encoded. Characters in the unreserved character set MUST NOT be encoded. Hexadecimal characters in encodings MUST be upper case. Text names and values MUST be encoded as UTF-8 octets before percent-encoding them per [RFC3629].
unreserved = ALPHA, DIGIT, '-', '.', '_', '~'
I am really confused looking at this page. I intend to do this in Javascript/jQuery. Is there a simple way or function to achieve this ? Please suggest if there is some external library that can do this if jQuery directly can not.
Regards