[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:09:41 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit c60cce581acf95eb339740ea4f30bd07c774a5d2
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Nov 6 05:27:58 2003 +0000
Reviewed by Maciej.
- fixed 3473913 -- host names in simple mailto URLs are not getting encoded/decoded correctly yet
* Misc.subproj/WebNSURLExtras.m:
(applyHostNameFunctionToMailToURLString): Handle case where host name is at the end of the string.
(applyHostNameFunctionToURLString): Add the # character to the set of characters that can end
a domain name.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5401 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 082a43f..b37594b 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,14 @@
+2003-11-05 Darin Adler <darin at apple.com>
+
+ Reviewed by Maciej.
+
+ - fixed 3473913 -- host names in simple mailto URLs are not getting encoded/decoded correctly yet
+
+ * Misc.subproj/WebNSURLExtras.m:
+ (applyHostNameFunctionToMailToURLString): Handle case where host name is at the end of the string.
+ (applyHostNameFunctionToURLString): Add the # character to the set of characters that can end
+ a domain name.
+
2003-11-05 Richard Williamson <rjw at apple.com>
Fixed 3413067, 3405797, 3456877
diff --git a/WebKit/Misc.subproj/WebNSURLExtras.m b/WebKit/Misc.subproj/WebNSURLExtras.m
index c5c32b6..3b7654a 100644
--- a/WebKit/Misc.subproj/WebNSURLExtras.m
+++ b/WebKit/Misc.subproj/WebNSURLExtras.m
@@ -17,8 +17,8 @@
typedef void (* StringRangeApplierFunction)(NSString *string, NSRange range, void *context);
-// Needs to be big enough to hold an IDNA-encoded name.
-// This is way bigger than needed, since I think there's a 63-character limit.
+// Needs to be big enough to hold an IDN-encoded name.
+// For host names bigger than this, we won't do IDN encoding, which is almost certainly OK.
#define HOST_NAME_BUFFER_LENGTH 2048
#define URL_BYTES_BUFFER_LENGTH 2048
@@ -99,14 +99,22 @@ static void applyHostNameFunctionToMailToURLString(NSString *string, StringRange
// Find end of host name.
unsigned hostNameStart = remaining.location;
NSRange hostNameEnd = [string rangeOfCharacterFromSet:hostNameEndCharacters options:0 range:remaining];
+ BOOL done;
if (hostNameEnd.location == NSNotFound) {
- return;
+ hostNameEnd.location = stringLength;
+ done = YES;
+ } else {
+ remaining.location = NSMaxRange(hostNameEnd);
+ remaining.length = stringLength - remaining.location;
+ done = NO;
}
- remaining.location = NSMaxRange(hostNameEnd);
- remaining.length = stringLength - remaining.location;
// Process host name range.
f(string, NSMakeRange(hostNameStart, hostNameEnd.location - hostNameStart), context);
+
+ if (done) {
+ return;
+ }
} else {
// Skip quoted string.
ASSERT(c == '"');
@@ -171,7 +179,7 @@ static void applyHostNameFunctionToURLString(NSString *string, StringRangeApplie
static NSCharacterSet *hostTerminators;
if (hostTerminators == nil) {
- hostTerminators = [[NSCharacterSet characterSetWithCharactersInString:@":/?"] retain];
+ hostTerminators = [[NSCharacterSet characterSetWithCharactersInString:@":/?#"] retain];
}
// Start after the separator.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list