[
https://issues.apache.org/jira/browse/CB-838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13285505#comment-13285505
]
Kimmo Puputti commented on CB-838:
----------------------------------
I made a simple app to test the localStorage read/write handling of custom
strings:
https://github.com/kpuputti/cordova-localstorage-experiment
I noticed that writing a string with a forward slash works, but when it is
read, the string is cut from the first occurrence of the slash character.
With the quote character, the string is saved, but the whole app crashes when
it is attempted to read again.
>From logs:
"A first chance exception of type 'System.SystemException' occurred in
Microsoft.Phone.Interop.dll"
and a popup:
"SystemException was unhandled"
"An unknown error has occurred. Error: 80020101."
One possible fix that comes to mind is e.g. base64 encode everything that is
saved to localStorage, and decode back when read.
Any thoughts?
> localStorage breaks with certain characters
> -------------------------------------------
>
> Key: CB-838
> URL: https://issues.apache.org/jira/browse/CB-838
> Project: Apache Cordova
> Issue Type: Bug
> Components: WP7
> Affects Versions: 1.7.0
> Reporter: Kimmo Puputti
> Assignee: Jesse MacFadyen
>
> The localStorage API seems to break with quote ( ' ) and forward slash ( / )
> characters in the value.
> This might be an issue in the native browser view, but can it be fixed in the
> Cordova layer (as the iOS localStorage fix)?
> More info:
> https://groups.google.com/group/phonegap/browse_thread/thread/925ab19412d04e37?pli=1
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira