When are we supposed to use escape instead of encodeURI / encodeURIComponent?
Use escape:
OR
use encodeURI() / encodeURIComponent()
escape()
Don't use it, as it has been deprecated since ECMAScript v3.
encodeURI()
Use encodeURI when you want a working URL. Make this call:
encodeURIComponent()