title: JQuery escape apostrophes and double apostrophes?
body: <p>I want to use JQ to print to a div on my page. The string I want to print with contains HTML including apostrophes and double apostrophes.</p>
  
  <p>Is there a plugin or function to escape this so that the string doesnt break the js variable? There may be the case that I can't escape all of the apostrophes and double apostrophes in the incoming data using a backslash, so I'm looking for a function that can do it. </p>
  
  <p>EG;</p>
  
  <pre><code>var replacement = 'This content has an apostrophe ' and a double apostrophe "';
  
  $("#overwrite").text(replacement);
  </code></pre>
  
  <p>TIA</p>