diff options
author | Christian Kraus <hanzi@hanzi.cc> | 2020-01-04 18:29:26 +0100 |
---|---|---|
committer | Christian Kraus <hanzi@hanzi.cc> | 2020-01-04 18:29:26 +0100 |
commit | 432c2bbd75c73d4b0a9c1d85c200155356bc6973 (patch) | |
tree | 07cf1f21e10c02cf98acfce807ce18f3e9ebbeff /src | |
parent | c3803e4595e09c7e885252e590607c7e8a0839df (diff) |
Fix parsing of vCards that contain comma in their address
Signed-off-by: Christian Kraus <hanzi@hanzi.cc>
Diffstat (limited to 'src')
-rw-r--r-- | src/models/contact.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/models/contact.js b/src/models/contact.js index 199ffc37..ba0d2651 100644 --- a/src/models/contact.js +++ b/src/models/contact.js @@ -83,6 +83,15 @@ export default class Contact { throw new Error('Invalid vCard') } + // Fixes nextcloud/contacts#1009 that prevented editing of contacts if + // their address contained a comma. This is actually a bug in ical.js + // but it has not been fixed for some time now. + // + // This can be removed once https://github.com/mozilla-comm/ical.js/issues/386 + // has been resolved. + ICAL.design.vcard.param.label = { multiValue: false } + ICAL.design.vcard3.param.label = { multiValue: false } + let jCal = ICAL.parse(vcard) if (jCal[0] !== 'vcard') { throw new Error('Only one contact is allowed in the vcard data') |