Closed rfc2822 closed 3 years ago
Hello again! According to RFC 6350 p.33, newlines can be escaped in the LABEL parameter using \n
. This rule only applies to the LABEL parameter of the ADR property.
The property can also include a "LABEL" parameter to present a
delivery address label for the address. Its value is a plain-text
string representing the formatted address. Newlines are encoded
as \n, as they are for property values.
Because this rule is unique to this specific parameter, I decided to have this rule take precedence over the caret encoding rules.
If you add a newline to any other parameter, you'll see that it escapes the newline according to the caret encoding syntax.
Ahh, thanks! :) I guess \n
is also more compatible.
Sorry for the noise.
I guess \n is also more compatible.
I'm not sure why they didn't use backslash escaping everywhere. It would have made more sense (to me, anyway).
Sorry for the noise.
It's no problem, I appreciate the feedback.
Hi,
Thanks for your great library! When testing around with DAVx⁵, I have found the following:
According to RFC 6868 p.2, when generating vCards, caret encoding means:
ez-vcard encodes the
^
and"
, but not\n
or\r\n
:I'm not absolutely sure as I'm not an expert on caret encoding, but shouldn't the newline be encoded as
^n
?