Escape js strings in smarty templates