mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +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
b7533dd479
commit
1da85f67df
2 changed files with 10 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
||||||
* Source/NSFileManager.m: don't abort directory copy just because
|
* Source/NSFileManager.m: don't abort directory copy just because
|
||||||
we can't set attributes of destination directory. Don't try to
|
we can't set attributes of destination directory. Don't try to
|
||||||
copy directories with their old owners.
|
copy directories with their old owners.
|
||||||
|
* Source/Additions/GSXML.m: Support #x and #X unescaping.
|
||||||
* Source/NSSocketPortNameServer.m:
|
* Source/NSSocketPortNameServer.m:
|
||||||
* Source/NSBundle.m:
|
* Source/NSBundle.m:
|
||||||
* Source/NSProcessInfo.m:
|
* Source/NSProcessInfo.m:
|
||||||
|
|
|
@ -4259,7 +4259,15 @@ static BOOL warned = NO; if (warned == NO) { warned = YES; NSLog(@"WARNING, use
|
||||||
{
|
{
|
||||||
unichar u;
|
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;
|
unsigned val = 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue