mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Attempt to handle illegal character in nib.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24657 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5add923d0f
commit
0365aef78c
2 changed files with 23 additions and 14 deletions
|
@ -3,7 +3,10 @@
|
|||
* Source/NSRunLoop.m: ([performSelector:target:argument:order:modes:])
|
||||
Alter to retain target and arguments to match MacOS-X (bug #19099)
|
||||
* Source/NSString.m: Fixup removal of leading path separator when
|
||||
appending path component.
|
||||
appending path componet.
|
||||
* Source/NSPropertyList.m: If parsing of xml property list fails,
|
||||
try again with more tolerant parser which accepts illegal characters.
|
||||
Might fix bug #17112 (illegal character in nib)
|
||||
|
||||
2007-02-17 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -2597,20 +2597,26 @@ GSPropertyListMake(id obj, NSDictionary *loc, BOOL xml,
|
|||
{
|
||||
result = nodeToObject([node firstChild], anOption, &error);
|
||||
}
|
||||
#else
|
||||
GSXMLPListParser *parser;
|
||||
|
||||
parser = AUTORELEASE([[GSXMLPListParser alloc] initWithData: data
|
||||
mutability: anOption]);
|
||||
if ([parser parse] == YES)
|
||||
{
|
||||
result = AUTORELEASE(RETAIN([parser result]));
|
||||
}
|
||||
else
|
||||
{
|
||||
error = @"failed to parse as XML property list";
|
||||
}
|
||||
#endif
|
||||
/* The libxml based parser is stricter than the fallback
|
||||
* parser, so if parsing failed using that, we can try again.
|
||||
*/
|
||||
if (result == nil)
|
||||
{
|
||||
GSXMLPListParser *parser;
|
||||
|
||||
parser = [GSXMLPListParser alloc];
|
||||
parser = AUTORELEASE([parser initWithData: data
|
||||
mutability: anOption]);
|
||||
if ([parser parse] == YES)
|
||||
{
|
||||
result = AUTORELEASE(RETAIN([parser result]));
|
||||
}
|
||||
else if (error == nil)
|
||||
{
|
||||
error = @"failed to parse as XML property list";
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue