mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +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
bf10e5a5dd
commit
571308fc25
1 changed files with 17 additions and 5 deletions
|
@ -1842,10 +1842,10 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
|||
if (*src == '\\')
|
||||
{
|
||||
src++;
|
||||
}
|
||||
if (flags.buggyQuotes == 1 && *src != '\\' && *src != '"')
|
||||
{
|
||||
*dst++ = '\\'; // Buggy use of escape in quotes.
|
||||
if (flags.buggyQuotes == 1 && *src != '\\' && *src != '"')
|
||||
{
|
||||
*dst++ = '\\'; // Buggy use of escape in quotes.
|
||||
}
|
||||
}
|
||||
*dst++ = *src++;
|
||||
}
|
||||
|
@ -1893,7 +1893,7 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
|||
*/
|
||||
- (void) setBuggyQuotes: (BOOL)flag
|
||||
{
|
||||
if (flag == YES)
|
||||
if (flag)
|
||||
{
|
||||
flags.buggyQuotes = 1;
|
||||
}
|
||||
|
@ -2245,6 +2245,10 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
|||
lineStart += bLength;
|
||||
sectionStart = lineStart;
|
||||
child = [GSMimeParser new];
|
||||
if (flags.buggyQuotes == 1)
|
||||
{
|
||||
[child setBuggyQuotes: YES];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2311,6 +2315,10 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
|||
}
|
||||
RELEASE(child);
|
||||
child = [GSMimeParser new];
|
||||
if (flags.buggyQuotes == 1)
|
||||
{
|
||||
[child setBuggyQuotes: YES];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2320,6 +2328,10 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
|||
NSLog(@"Failed to decode section of multipart");
|
||||
RELEASE(child);
|
||||
child = [GSMimeParser new];
|
||||
if (flags.buggyQuotes == 1)
|
||||
{
|
||||
[child setBuggyQuotes: YES];
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue