Windows Phone localStorage forward slash (ver 1.4.1)

127 views
Skip to first unread message

James West

unread,
Feb 26, 2012, 9:09:41 AM2/26/12
to phonegap
Hi All,

I've been having troubles developing with PhoneGap for Windows Phone.

I want to be able to store forward slashes ( / ) and quotes ( ' ) and
semi-colons ( ; ) - but when I try I get a lot of errors from the c#
code side when invoking localStorage.setItem and localStorage.getItem.

It's coming from the HandleStorageCommand function in the
DOMStorageHelper.cs where this stuff is handled.

Essentially there is a text string called commandStr which contains
the entire command, and is then split up into individual strings using
the c# command commandStr.Split('/') - which means if I have a forward
slash in my text it cuts it up.

Additionally, when calling the localStorage.getItem if the string
contains a quote ( ' ) it breaks the code going back to the browser.


Has anyone else come across these issues?

Thank you

Kerri Shotts

unread,
Feb 26, 2012, 11:18:43 PM2/26/12
to phon...@googlegroups.com
Granted that you shouldn't have to do it, but does escaping the characters fix it, or does it continue to have issues?

James West

unread,
Mar 1, 2012, 7:51:10 AM3/1/12
to phonegap
Hi Kerri,

It has just too many issues to be considered stable or yet usable
apart from storing simple strings and numbers.
I did try escaping it, but the code clearly shows that it is splitting
the strings based on the quote ( ' ) character, regardless of whether
it's escaped or not. I did start to make changes but decided I was
making too many for comfort.

I wasted about four days trying to deal with the issues before
abandoning, so instead I've gone down the route of Eclipse and
Android. Whilst it is frustrating on just how slow the Android
emulator is, it works flawlessly on the stuff I want to do.

I'll keep checking future versions of PhoneGap to see if those issues
are resolved, but I don't want to make any significant code changes to
the phonegap app only for it to die on me when I upgrade.

Thank you

woeitje

unread,
May 7, 2012, 3:59:57 PM5/7/12
to phon...@googlegroups.com
Hi,

I experience the same problem with Cordova 1.7.0.
Is there a solution for this issue yet? Or when will it become available?

Vaibhav Parikh

unread,
May 10, 2012, 2:19:35 AM5/10/12
to phon...@googlegroups.com
Hi everyone ..

I am facing the same issue with "/" in string to be stored in local storage .

With out any special characters it works fine ..!!

is there any tweak to make it work...?
unfortunately WP7 also doesnt support Sqlite...:( 
Reply all
Reply to author
Forward
0 new messages