JavaScript - The escape, encodeURI, and encodeURIComponent methods

javascript

// JavaScript - The escape, encodeURI, and encodeURIComponent methods:

The escape function is responsible for HTML encoding a string.  Basically, the
escape function take invalid characters, encode them so that they can be use
in the HTML.  The unescape function does the decoding. The decodeURI and 
encodeURI methods are for handling invalid characters in a URL.  The 
encodeURIComponent and decodeURIComponent are for handling invalid characters
in URI components.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License