title: How do I get decode double encoded HTML with JavaScript?
body: <p>My CMS stores HTML double encoded, and I'd like to un-encode it with JavaScript. I've looked at <a href="https://stackoverflow.com/questions/1912501/unescape-html-entities-in-javascript">Unescape HTML entities in Javascript?</a> but solutions like this only address html that's been encoded once.</p>
  
  <p>By double encoded, I mean that a character like &lt; doesn't just become &amp;lt;, it becomes &amp;amp;lt;</p>
  
  <p>Example:</p>
  
  <pre><code>&amp;amp;lt;h1&amp;amp;gt;Beginning November 1st, Renew your Membership online&amp;amp;lt;/h1&amp;amp;gt;&amp;#xD; &amp;amp;lt;a href=&amp;amp;quot;/join-renew&amp;amp;quot; class=&amp;amp;quot;btn&amp;amp;quot;&amp;amp;gt;Join/Renew&amp;amp;lt;/a&amp;amp;gt;
  </code></pre>