replace deprecated escape/unescape

- use encodeURIComponent/decodeURIComponent