Parameter Value Encoding in iCalendar and vCard
updates
Extracted elements (10)
A modified \-escaping for parameters was also rejected because non-interoperable use of \ in parameter values has already been observed in the wild, and using a different escape character (^) avoids confusion between parameter and property escaping rules.
The ^ character was chosen as the escape character because it is an ASCII non-alphanumeric symbol and is least likely to appear in existing iCalendar/vCard parameter data, minimizing impact on existing data.
The double-quote character is encoded as ^' (single-quote) rather than ^" to avoid any escape sequence that itself contains a double-quote, which would break backwards-compatible parsing by existing iCalendar/vCard parsers.
The \-escaping mechanism used for property values was rejected for parameter values because escaping a double-quote with a sequence containing a double-quote (e.g., \") causes existing parsers to misparse the parameter boundary, making it backwards-incompatible.
This specification updates RFC 5545 (iCalendar), RFC 6321 (xCal), RFC 6350 (vCard), and RFC 6351 (xCard) to allow ^ escape sequences in parameter values; implementations of those formats must be updated to generate and consume these sequences consistently.
When converting between iCalendar/vCard text-based formats and XML alternative representations (xCal RFC 6321, xCard RFC 6351), implementations MUST ensure that parameter value escape sequences are correctly generated in the text format and decoded in the alternate formats.
When parsing parameter values, if a ^ character is followed by any character other than n, ^, or ', parsers MUST leave both the ^ and the following character in place.
The ^ character (U+005E, Circumflex Accent) is defined as the escape character for iCalendar and vCard parameter values whose value type uses the 'param-value' syntax element. This escaping mechanism applies whether the value is quoted or unquoted.
There are no additional security issues introduced by this specification beyond those already present in iCalendar (RFC 5545) and vCard (RFC 6350).
Three escape sequences are defined: ^n (U+005E U+006E) encodes a formatted line break; ^^ (U+005E U+005E) encodes a literal ^ character; ^' (U+005E U+0027) encodes a double-quote character (U+0022).