File tree 2 files changed +27
-0
lines changed
2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ import store from '../store'
28
28
import updateDesignSet from '../services/updateDesignSet'
29
29
import sanitizeSVG from '@mattkrick/sanitize-svg'
30
30
31
+ window . ICAL = ICAL
32
+
31
33
/**
32
34
* Check if the given value is an empty array or an empty string
33
35
*
Original file line number Diff line number Diff line change @@ -63,6 +63,30 @@ const addGroupedProperties = vCard => {
63
63
return madeChanges
64
64
}
65
65
66
+ /**
67
+ * Fixes misbehaviour with TYPE quotes and separated commas
68
+ * Seems to have been introduced with https://github.com/mozilla-comm/ical.js/pull/387
69
+ *
70
+ * @returns {Boolean } Whether or not the design set has been altered.
71
+ */
72
+ const setTypeMultiValueSeparateDQuote = ( ) => {
73
+ if (
74
+ ! ICAL . design . vcard . param . type
75
+ || ICAL . design . vcard . param . type . multiValueSeparateDQuote !== false
76
+ || ! ICAL . design . vcard3 . param . type
77
+ || ICAL . design . vcard3 . param . type . multiValueSeparateDQuote !== false
78
+ ) {
79
+ // https://github.com/mozilla-comm/ical.js/blob/ba8e2522ffd30ffbe65197a96a487689d6e6e9a1/lib/ical/stringify.js#L121
80
+ ICAL . design . vcard . param . type . multiValueSeparateDQuote = false
81
+ ICAL . design . vcard3 . param . type . multiValueSeparateDQuote = false
82
+
83
+ return true
84
+ }
85
+
86
+ return false
87
+ }
88
+
89
+ /**
66
90
/**
67
91
* Check whether the ical.js design sets need updating (and if so, do it)
68
92
*
@@ -72,6 +96,7 @@ const addGroupedProperties = vCard => {
72
96
export default function ( vCard ) {
73
97
let madeChanges = false
74
98
99
+ madeChanges |= setTypeMultiValueSeparateDQuote ( )
75
100
madeChanges |= removePhoneNumberValueType ( )
76
101
madeChanges |= addGroupedProperties ( vCard )
77
102
You can’t perform that action at this time.
0 commit comments