Passing in a text to a javascript function that may have a single quote
<p>I have a link that I dynamically create which looks something like the following:</p>

<pre><code>&lt;a onclick="Edit('value from a text column here')" href="javascript:void(null);"&gt;Edit&lt;/a&gt;
</code></pre>

<p>with the Edit function then taking the passed in value and putting it into a Yahoo Rich Text Editor. This works well except for when there is a single quote in the text being passed. The obvious problem being that the link then looks something like:</p>

<pre><code>&lt;a onclick="Edit('I'm a jelly donut')" href="javascript:void(null);"&gt;Edit&lt;/a&gt;
</code></pre>

<p>Any suggestions on what I can do? I'd rather not stray too far from the structure I am currently using because it is something of a standard (and maybe the standard sucks, but that's another question altogether).</p>

<p>Note: I am using ASP as my server side language.</p>
