mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Support unescaping#x and #X entities
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22623 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
48d81791bc
commit
0060ce88ce
2 changed files with 10 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
|||
* Source/NSFileManager.m: don't abort directory copy just because
|
||||
we can't set attributes of destination directory. Don't try to
|
||||
copy directories with their old owners.
|
||||
* Source/Additions/GSXML.m: Support #x and #X unescaping.
|
||||
* Source/NSSocketPortNameServer.m:
|
||||
* Source/NSBundle.m:
|
||||
* Source/NSProcessInfo.m:
|
||||
|
|
|
@ -4259,7 +4259,15 @@ static BOOL warned = NO; if (warned == NO) { warned = YES; NSLog(@"WARNING, use
|
|||
{
|
||||
unichar u;
|
||||
|
||||
if ([s hasPrefix: @"�x"] || [s hasPrefix: @"�X"])
|
||||
if ([s hasPrefix: @"&#x"] || [s hasPrefix: @"&#X"])
|
||||
{
|
||||
unsigned val = 0;
|
||||
|
||||
s = [s substringFromIndex: 3];
|
||||
sscanf([s UTF8String], "%x", &val);
|
||||
u = val;
|
||||
}
|
||||
else if ([s hasPrefix: @"�x"] || [s hasPrefix: @"�X"])
|
||||
{
|
||||
unsigned val = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue