php addslashes becomes illegal token in javascript
<p>i tried using jquery ajax call, everything works fine until i tried to escape the json string using addslashes on the the server side i get the follow error : unexpected token illegal. here is my json string i cant find any problems in it</p>

<pre><code>[{\"shortlist\":{\"id\":\"46\",\"application_id\":\"3\",\"created\":\"2012-04-
22\",\"modified\":\"2012-04-22\"},\"application\": 
{\"id\":\"3\",\"admissionsession_id\":\"0\",\"school_id\":\"\",\"surname\":\"oni\",\"
other_names\":\"oluwafemi timothy Toluwalope\",\"date_of_birth\":\"0000-00-    
00\",\"created\":\"2012-04-15\",\"modified\":\"2012-04-15\"}}]
</code></pre>

<p>if i remove the addslahes from the php json string it works fine. am scared of leaving my string unescaped tho.</p>
