Adding options to dropdown with string values containing spaces causing syntax error
<p>I currently have a series links that open menus containing dropdowns and input textboxes to add new options to the dropdowns:</p>

<p><img src="http://i.stack.imgur.com/YiNc6.jpg" alt="enter image description here"></p>

<p>If I save a value containing no spaces ("hello"), everything works fine, but if a value contains spaces ("hello 2"), I get an exception that says 'Uncaught Error: Syntax error, unrecognized expression: [value=hello 2]'</p>

<p>These are the two approaches that I've tried so far that have been unsuccessful:</p>

<pre><code>$('.addSetSelect').append('&lt;option value="' + setName + '"&gt;' + setName + '&lt;/option&gt;');
</code></pre>

<p>and</p>

<pre><code>$('.addSetSelect').append(new Option(setName, setName));
</code></pre>

<p>I was wondering what is the best way to go about adding option elements to a selectbox that can contain value attributes with spaces?</p>
