diff --git a/ChangeLog b/ChangeLog index 4a93645f6..58f35d3af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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: diff --git a/Source/Additions/GSXML.m b/Source/Additions/GSXML.m index 77c82ee85..555e3b0ad 100644 --- a/Source/Additions/GSXML.m +++ b/Source/Additions/GSXML.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;