diff --git a/lib/ical/parse.js b/lib/ical/parse.js index ae85fca7..e0b7dfa1 100644 --- a/lib/ical/parse.js +++ b/lib/ical/parse.js @@ -419,7 +419,9 @@ parse._parseParameters = function(line, start, designSet) { value = line.slice(valuePos, nextPos); } + const length_before = value.length; value = parse._rfc6868Escape(value); + valuePos += length_before - value.length; if (multiValue) { let delimiter = mvdelim || multiValue; value = parse._parseMultiValue(value, delimiter, type, [], null, designSet); diff --git a/test/parser/property_params.ics b/test/parser/property_params.ics index 522afdcb..e6c3697f 100644 --- a/test/parser/property_params.ics +++ b/test/parser/property_params.ics @@ -7,6 +7,7 @@ ATTENDEE;CN="Foo, Bar":mailto:foo3@bar ATTENDEE;CN="Foo; Bar":mailto:foo4@bar ATTENDEE;DELEGATED-TO="mailto:foo7@bar";CN="Foo, Bar":mailto:foo5@bar ATTENDEE;DELEGATED-TO="mailto:foo7@bar";CN="Foo; Bar":mailto:foo6@bar +ATTENDEE;CN="^^Ж 4 <>\'^'^n:":mailto:foo9@bar ATTENDEE;ROLE="REQ-PARTICIPANT;foo";DELEGATED-FROM="mailto:bar@baz.com";PAR TSTAT=ACCEPTED;RSVP=TRUE:mailto:foo@bar.com ATTENDEE;CN=X\:mailto:x@example.org diff --git a/test/parser/property_params.json b/test/parser/property_params.json index 1ce9abeb..c5a6db4c 100644 --- a/test/parser/property_params.json +++ b/test/parser/property_params.json @@ -58,6 +58,14 @@ "cal-address", "mailto:foo6@bar" ], + [ + "attendee", + { + "cn": "^Ж 4 <>\\'\"\n:" + }, + "cal-address", + "mailto:foo9@bar" + ], [ "attendee", {