15

Right now, it is displayed as:

how %26 why

It should be:

how & why

4 Answers 4

42

That would be unescape().

2017 Edit: I should note that unescape() has now been deprecated in favour of decodeURI() and decodeURIComponent(). Also, escape() has been deprecated in favour of encodeURI and encodeURIComponent() respectively.

At least they are fairly obvious opposites.

0
5

Try calling unescape.

2

Try unescape()

Note:

The deprecated unescape() method computes a new string in which hexadecimal escape sequences are replaced with the character that it represents. The escape sequences might be introduced by a function like escape. Because unescape is deprecated, use decodeURI or decodeURIComponent instead.

0

you can use unescape to remove escape characters.

Moreover, unescape/escape is not deprecated over decodeURL/encodeURL . but decodeURL/encodeURL is preferable to decode/encode URL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.