The problem is the quotation marks. They change the value of the SQL query and cause an error.
I can not find any information on how to properly screen them. I read that you can put \ in front of them and then add ESCAPE ("\") to the SQL statement, but this does not seem to work with the PhoneGap implementation.
In the end, I made a simple replacement where single or double quotes are replaced with " , eg:
var thisNotes = $('textarea#notes').val().replace(/(["'])/g,'"');
I just need to display quotes in the text box, but I don’t need them as part of the HTML link, so I'm not sure if the link will work. You may need to cancel the replacement before displaying the link.
Hope this helps.
Stephen cronin
source share