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

{{DomRef}}

Summary

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

Syntax

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

Example

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

Specification

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

See also

Revision Source

<div>{{DomRef}}</div>

<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>)
</pre>

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


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

<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>
<ul>
<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>
</ul>
Revert to this revision