Revision 407479 of window.unescape

  • Revision slug: Web/API/window.unescape
  • Revision title: window.unescape
  • Revision id: 407479
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment CleanUp, #Notes > #See_also.DOM/window.unescape Web/API/window.unescape

Revision Content



Decodes a value that has been encoded in hexadecimal (e.g., a cookie).


regular = window.unescape(escaped)
  • regular is the decoded string.
  • escaped is the encoded string.


alert(unescape("%5C")); // displays "\"


{{DOM0}} Mentioned in a non-normative section of ECMA-262.

See also

Revision Source


<h2 id="Summary" name="Summary">Summary</h2>
<p>Decodes a value that has been encoded in hexadecimal (e.g., a cookie).</p>

<h2 id="Syntax" name="Syntax">Syntax</h2>

<pre class="syntaxbox">
<i>regular</i> = window.unescape(<i>escaped</i>)

  <li><code>regular</code> is the decoded string.</li>
  <li><code>escaped</code> is the encoded string.</li>

<h2 id="Example" name="Example">Example</h2>
<pre class="brush:js">
alert(unescape("%5C")); // displays "\"

<h2 id="Specification" name="Specification">Specification</h2>
<p>{{DOM0}} Mentioned in a non-normative section of ECMA-262.</p>

<h2 id="See_also" name="See_also">See also</h2>
<li><a href="/en-US/docs/DOM/window.escape">window.escape</a></li>
<li><a href="/en-US/docs/JavaScript/Reference/Global_Functions/decodeURIComponent">decodeURIComponent</a></li>
Revert to this revision