title: append item to select box with jquery while escaping quotes
body: <p>I'm adding options to a select box as follows:</p>
  <pre><code>x.append(&quot;&lt;option value=&quot;+option_to_add+&quot;&gt;&quot;+option_to_add+&quot;&lt;/option&gt;&quot;);
  </code></pre>
  <p>where &quot;option_to_add&quot; can be any value a user has entered.
  Of course, a problem arises when adding options that have single or double quotes in them.</p>
  <p>Is there a way to escape these values correctly before appending them to a select list</p>
  <p>e.g. this will be a problem</p>
  <p>user types: <code>he&quot;llo</code>
  my code will try to append this as : <code>&lt;option value=&quot;he&quot;llo&quot;/&gt;</code> which crashes the html/js</p>