[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
cblu
cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:10:42 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 3021954e2a078531ecc1a00840c10d3ed631fc9f
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 10 19:58:16 2003 +0000
Fixed: <rdar://problem/3478351>: Safari: URL Alias on Dock failed to open the 2byte URL
Reviewed by dave.
* Misc.subproj/WebNSURLExtras.m:
(-[NSString _web_mapHostNameWithRange:encode:makeString:]): if the host name is percent-escaped, use CFURLCreateStringByReplacingPercentEscapes
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5440 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index f3934af..730ec64 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2003-11-10 Chris Blumenberg <cblu at apple.com>
+
+ Fixed: <rdar://problem/3478351>: Safari: URL Alias on Dock failed to open the 2byte URL
+
+ Reviewed by dave.
+
+ * Misc.subproj/WebNSURLExtras.m:
+ (-[NSString _web_mapHostNameWithRange:encode:makeString:]): if the host name is percent-escaped, use CFURLCreateStringByReplacingPercentEscapes
+
2003-11-10 Richard Williamson <rjw at apple.com>
Use ICU for upper/lower conversion. Fixed 3477157, 3478455, 3478456, 3478457, 3478486.
diff --git a/WebKit/Misc.subproj/WebNSURLExtras.m b/WebKit/Misc.subproj/WebNSURLExtras.m
index 3b7654a..35fd836 100644
--- a/WebKit/Misc.subproj/WebNSURLExtras.m
+++ b/WebKit/Misc.subproj/WebNSURLExtras.m
@@ -592,14 +592,26 @@ static NSString *mapHostNames(NSString *string, BOOL encode)
UChar sourceBuffer[HOST_NAME_BUFFER_LENGTH];
UChar destinationBuffer[HOST_NAME_BUFFER_LENGTH];
- [self getCharacters:sourceBuffer range:range];
+ NSString *string = self;
+ if (encode && [self rangeOfString:@"%" options:NSLiteralSearch range:range].location != NSNotFound) {
+ NSString *substring = [self substringWithRange:range];
+ substring = (NSString *)CFURLCreateStringByReplacingPercentEscapes(NULL, (CFStringRef)substring, CFSTR(""));
+ if (substring != nil) {
+ string = substring;
+ range = NSMakeRange(0, [string length]);
+ }
+ }
+
+ int length = range.length;
+ [string getCharacters:sourceBuffer range:range];
+
UErrorCode error = U_ZERO_ERROR;
int32_t numCharactersConverted = (encode ? uidna_IDNToASCII : uidna_IDNToUnicode)
- (sourceBuffer, range.length, destinationBuffer, HOST_NAME_BUFFER_LENGTH, UIDNA_ALLOW_UNASSIGNED, NULL, &error);
+ (sourceBuffer, length, destinationBuffer, HOST_NAME_BUFFER_LENGTH, UIDNA_ALLOW_UNASSIGNED, NULL, &error);
if (error != U_ZERO_ERROR) {
return nil;
}
- if (numCharactersConverted == (int)range.length && memcmp(sourceBuffer, destinationBuffer, range.length * sizeof(UChar)) == 0) {
+ if (numCharactersConverted == length && memcmp(sourceBuffer, destinationBuffer, length * sizeof(UChar)) == 0) {
return nil;
}
return makeString ? [NSString stringWithCharacters:destinationBuffer length:numCharactersConverted] : self;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list