Comparing three methods of URI encoding. Escape() is probably best avoided, with encodeURI() and encodeURIComponent() being used depending on what form your data is in.