Skip to content

Commit 524310c

Browse files
committed
email_lib: encode LF-only newlines for vcard
References: GXH-120
1 parent 7a60d78 commit 524310c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/email/vcard.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ static size_t vcard_serialize_string(char *pbuff,
400400
pbuff[offset++] = '\\';
401401
if (line_offset >= 0)
402402
line_offset ++;
403-
} else if ('\r' == string[i] && '\n' == string[i + 1]) {
403+
} else if ((string[i] == '\r' && string[i+1] == '\n') || string[i] == '\n') {
404404
if (offset + 1 >= max_length)
405405
return max_length;
406406
pbuff[offset++] = '\\';

0 commit comments

Comments
 (0)