Fixing error on _confirm

double quotes from json_encode results in an js error (onclick="if (confirm("Are you sure you want to delete # 2?"))......")
What about ```addslashes()```? instead of adding wrapping ```''```s