title: while using decodeURIComponent(atob(str)) its returning back with error saying Uncaught URIError: URI malformed
body: <pre><code>var str = "PHNwYW4gc3R5bGU9ImZvbnQtZmFtaWx5OiBtb25vc3BhY2U7IGZvbnQtc2l6ZTogbWVkaXVtOyBiYWNrZ3JvdW5kLWNvbG9yOiByZ2IoMjM5LCAyMzksIDIzOSk7Ij4mcXVvdDt+IUAjJCVeJmFtcDsqKClfK3t9fDomcXVvdDsmbHQ7Jmd0Oz9+IUAjJCVeJmFtcDsqKCZxdW90Ozwvc3Bhbj48cD48L3A+";
  
  unescape(atob(str));// able to decodeURIComponent;
  </code></pre>
  
  <p>but with <code>decodeURIComponent(atob(str));</code> I'm getting exception saying <code>Uncaught URIError: URI malformed</code>.</p>
  
  <p>After <code>atob(str)</code>, the response is coming with 2 '%', if i remove the % then the <code>decodeURIComponent</code> is working fine. Why with % its not coming , and what is the substitute for that, and i don't want to use <code>unescape</code>, as it's deprecate?</p>
  
  <p>any solution for this ?</p>