I'm currently importing an xml export of a mysql database into a websql database for use in an online mobile experience.
Everything works fine and dandy until there are double quotes in whatever string I am inserting. Normally, in PHP I would be using something like: mysql_real_escape_string while inserting.
Options I know I can try is to write regex and make functions for adding/removing slashes. There are lots of examples on google for this - but what i'm looking to see is if anyone else has encountered this, and possibly has a better solution.
Thanks for any help!
string.replace("\"", "\\\"")
Will replace"
by\"
. It looks a bit odd but that's because the escape character needs to be escaped as well, funzies :P