cozy / cozy-emails

Email Client for Cozy
GNU Affero General Public License v3.0
66 stars 41 forks source link

Error serializing contacts #710

Closed clochix closed 8 years ago

clochix commented 8 years ago

See this user report.

One of the contact has quotes in url datapoint, so the serialization is wrong. See http://stackoverflow.com/questions/13916673/issue-with-json-stringify-adding-a-extra-and-to-my-json-object.

Instead of window.contacts = JSON.stringify(contacts); we should use window.contacts = JSON.stringify({obj: contacts}); window.contacts = window.contacts.obj. We should probably do the same for every object we serialize.

clochix commented 8 years ago

There was nothing wrong with serialization, just a contact badly formatted. Deleting it fixed this issue.