You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While investigating an issue, I noticed that the ical.js parser seems to split values that contain a comma, even if the value is quoted or the comma escaped.
This causes ICAL.stringify.component to fail on the parsed jCal object.
Where it makes semantic sense, individual text components can include multiple text values (e.g., a "street" component with multiple lines) separated by the COMMA character (U+002C).
This makes me think that actually the text parsing itself is correct, but rather ICAL.stringify.property should convert the Array back into a stringat this location, rather than calling ICAL.stringify._rfc6868Unescape(value) with value being an Array (that doesn't have the replace function and causes the TypeError).
["vcard",[["version",{},"text","4.0"],["adr",{"type":"home","label":["Test 42"," Berlin"]},"text",["","",["Test 42"," Berlin"],"","","",""]]],[]]// Uncaught TypeError: t.replace is not a function// at Function.r._rfc6868Unescape (ical.js:1657)// at Function.r.property (ical.js:1493)// at Function.r.component (ical.js:1444)
While investigating an issue, I noticed that the ical.js parser seems to split values that contain a comma, even if the value is quoted or the comma escaped.
This causes
ICAL.stringify.component
to fail on the parsed jCal object.Update: I had a look at the
ADR
section in the RFC 6350:This makes me think that actually the text parsing itself is correct, but rather
ICAL.stringify.property
should convert the Array back into astring
at this location, rather than callingICAL.stringify._rfc6868Unescape(value)
withvalue
being anArray
(that doesn't have thereplace
function and causes theTypeError
).Input
Actual result
Expected result
The text was updated successfully, but these errors were encountered: