title: What's the right way to decode a string that has special HTML entities in it?
body: <p>Say I get some JSON back from a service request that looks like this:</p>
  
  <pre><code>{
      "message": "We&amp;#39;re unable to complete your request at this time."
  }
  </code></pre>
  
  <p>I'm not sure <em>why</em> that apostraphe is encoded like that (<code>&amp;#39;</code>); all I know is that I want to decode it.</p>
  
  <p>Here's one approach using jQuery that popped into my head:</p>
  
  <pre><code>function decodeHtml(html) {
      return $('&lt;div&gt;').html(html).text();
  }
  </code></pre>
  
  <p>That seems (very) hacky, though. What's a better way? Is there a "right" way?</p>