title: Strip slashes that jQuery adds when returning HTML via ajax?
body: <p>I am using the jQuery ajax method to get data from the database and return the data via a json object. However one of the values in this json object is an HTML string. I am basically doing exactly what is seen <a href="https://stackoverflow.com/questions/2083136/returning-json-and-html-from-php-script">here</a> except I need to know how I can remove the slashes that jQuery is adding to the HTML string. Any ideas?</p>
  
  <p><strong>Example</strong></p>
  
  <pre><code>json.HTML = Click &lt;a href=\"http://example.com/example.php\"&gt;here&lt;/a&gt;;
  
  //Needs to be
  json.HTML = Click &lt;a href="http://example.com/example.php"&gt;here&lt;/a&gt;;
  </code></pre>
  
  <p>I was hoping to do this without code if possible.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Ok I found that if I do htmlentites before it is returned, then the slashes are not there when the value comes in. Now, which jquery function would I use to insert this string inside a td element without slashes being added by .html or .text functions.</p>
  
  <p>Here is what it looks like directly from the json.HTML value,</p>
  
  <pre><code>Click &amp;lt;a href=\&amp;quot;http://example.com\&amp;quot;&amp;gt;here&amp;lt;/a&amp;gt;
  </code></pre>
  
  <p>And here is after it is displayed using .html</p>
  
  <pre><code>Click &lt;a href=\"http://example.com\"&gt;here&lt;/a&gt;
  </code></pre>
  
  <p>And here is after is it displayed using .text</p>
  
  <pre><code>Click &amp;lt;a href=\&amp;quot;http://example.com\&amp;quot;&amp;gt;here&amp;lt;/a&amp;gt;
  </code></pre>
  
  <p>I wonder if I need to use .val maybe? Oh one more thing, I want this HTML to be display literally, not the actual HTML to be inserted into the code.</p>