I have an event that when triggered call a function like the following:
<a href="javascript:fav.delete(\''+addslashes(value.title)+'\')">
the function receive the string title as parameter and all works fine but when quotes are inside the string.
I used the function from other topic: Escaping String in Javascript
But the following error arises in console when click on the link:
Uncaught SyntaxError: Invalid or unexpected token
fav.delete('Y-Splitter 1/2\
I think the first occurence of the quote in string close href attribute.
How can I avoid this?