How can i use special charecters in javascript string?
<p>In my JavaScript application i got result when using html given below</p>

<pre><code>&lt;a href='javascript:void(0)' onClick='javascript:chatWith("something")'&gt;link&lt;/a&gt;
</code></pre>

<p>But when using the code given below i am not getting result</p>

<pre><code>&lt;a href='javascript:void(0)' onClick='javascript:chatWith("something|something")'&gt;link&lt;/a&gt;.
</code></pre>

<p>Why does this happen?</p>
