mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 17:41:05 +00:00
Fix errors in handling buggy quotes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15129 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4ea9d6ba56
commit
40bd19ae21
1 changed files with 17 additions and 5 deletions
|
@ -1842,10 +1842,10 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
||||||
if (*src == '\\')
|
if (*src == '\\')
|
||||||
{
|
{
|
||||||
src++;
|
src++;
|
||||||
}
|
if (flags.buggyQuotes == 1 && *src != '\\' && *src != '"')
|
||||||
if (flags.buggyQuotes == 1 && *src != '\\' && *src != '"')
|
{
|
||||||
{
|
*dst++ = '\\'; // Buggy use of escape in quotes.
|
||||||
*dst++ = '\\'; // Buggy use of escape in quotes.
|
}
|
||||||
}
|
}
|
||||||
*dst++ = *src++;
|
*dst++ = *src++;
|
||||||
}
|
}
|
||||||
|
@ -1893,7 +1893,7 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
||||||
*/
|
*/
|
||||||
- (void) setBuggyQuotes: (BOOL)flag
|
- (void) setBuggyQuotes: (BOOL)flag
|
||||||
{
|
{
|
||||||
if (flag == YES)
|
if (flag)
|
||||||
{
|
{
|
||||||
flags.buggyQuotes = 1;
|
flags.buggyQuotes = 1;
|
||||||
}
|
}
|
||||||
|
@ -2245,6 +2245,10 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
||||||
lineStart += bLength;
|
lineStart += bLength;
|
||||||
sectionStart = lineStart;
|
sectionStart = lineStart;
|
||||||
child = [GSMimeParser new];
|
child = [GSMimeParser new];
|
||||||
|
if (flags.buggyQuotes == 1)
|
||||||
|
{
|
||||||
|
[child setBuggyQuotes: YES];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2311,6 +2315,10 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
||||||
}
|
}
|
||||||
RELEASE(child);
|
RELEASE(child);
|
||||||
child = [GSMimeParser new];
|
child = [GSMimeParser new];
|
||||||
|
if (flags.buggyQuotes == 1)
|
||||||
|
{
|
||||||
|
[child setBuggyQuotes: YES];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2320,6 +2328,10 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
||||||
NSLog(@"Failed to decode section of multipart");
|
NSLog(@"Failed to decode section of multipart");
|
||||||
RELEASE(child);
|
RELEASE(child);
|
||||||
child = [GSMimeParser new];
|
child = [GSMimeParser new];
|
||||||
|
if (flags.buggyQuotes == 1)
|
||||||
|
{
|
||||||
|
[child setBuggyQuotes: YES];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue