mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-03 22:22:19 +00:00
fix(core): don't remove double quotes when parsing versit strings
Fixes #3530
This commit is contained in:
@@ -69,7 +69,7 @@
|
|||||||
NSString *newString;
|
NSString *newString;
|
||||||
unichar *characters, *currentChar, *lastChar, *newPart, *newCurrentChar;
|
unichar *characters, *currentChar, *lastChar, *newPart, *newCurrentChar;
|
||||||
NSUInteger max;
|
NSUInteger max;
|
||||||
BOOL isEscaped, isQuoted;
|
BOOL isEscaped;
|
||||||
|
|
||||||
values = [NSMutableArray array];
|
values = [NSMutableArray array];
|
||||||
|
|
||||||
@@ -87,17 +87,7 @@
|
|||||||
|
|
||||||
while (currentChar < lastChar)
|
while (currentChar < lastChar)
|
||||||
{
|
{
|
||||||
if (isQuoted)
|
if (isEscaped)
|
||||||
{
|
|
||||||
if (*currentChar == '"')
|
|
||||||
isQuoted = NO;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
*newCurrentChar = *currentChar;
|
|
||||||
newCurrentChar++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (isEscaped)
|
|
||||||
{
|
{
|
||||||
if (*currentChar == 'n' || *currentChar == 'N')
|
if (*currentChar == 'n' || *currentChar == 'N')
|
||||||
*newCurrentChar = '\n';
|
*newCurrentChar = '\n';
|
||||||
@@ -114,9 +104,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (*currentChar == '"')
|
if (*currentChar == '\\')
|
||||||
isQuoted = YES;
|
|
||||||
else if (*currentChar == '\\')
|
|
||||||
isEscaped = YES;
|
isEscaped = YES;
|
||||||
else if (*currentChar == ',')
|
else if (*currentChar == ',')
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -837,7 +837,7 @@ static NSCharacterSet *whitespaceCharSet = nil;
|
|||||||
/* a regular content tag */
|
/* a regular content tag */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
check whether the tga value is encoded in quoted printable,
|
check whether the tag value is encoded in quoted printable,
|
||||||
this one is used with Outlook vCards (see data/ for examples)
|
this one is used with Outlook vCards (see data/ for examples)
|
||||||
*/
|
*/
|
||||||
// TODO: make the encoding check more generic
|
// TODO: make the encoding check more generic
|
||||||
|
|||||||
Reference in New Issue
Block a user