Inverted comma - php to javascript
<p>Consider this line of JavaScript</p>

<pre><code>str += "onclick=runTest(" +  field + "," + atom[0] + ",'" + atom[1] + "'); 
</code></pre>

<p>In the browser, it renders as:</p>

<pre><code>onclick="runTest(104,213,'Orsan" Miller');
</code></pre>

<p>There is an inverted comma between Orsan and Miller although in fact there was not any inverted comma, it's causing a bug.</p>

<pre><code>atom[1] = Orsan Miller
</code></pre>

<p>'Orsan Miller' comes from DB query in PHP.</p>

<p>How can this be fixed?</p>
