[Webkit-unassigned] [Bug 6452] New: KIO::appendEscapingBadChars() doesn't know about %u-escaping.
bugzilla-daemon at opendarwin.org
bugzilla-daemon at opendarwin.org
Mon Jan 9 08:54:03 PST 2006
http://bugzilla.opendarwin.org/show_bug.cgi?id=6452
Summary: KIO::appendEscapingBadChars() doesn't know about %u-
escaping.
Product: WebKit
Version: 412+
Platform: Macintosh
OS/Version: Mac OS X 10.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: JavaScript
AssignedTo: webkit-unassigned at opendarwin.org
ReportedBy: grubba at grubba.org
Sending a %u-escaped string (eg as generated by escape() for unicode data) to
XMLHttpRequest::open() will cause any %u's to be escaped an extra time (ie the
webserver will receive %25u2014 instead of %u2014). The likely culprit seems to
be WebCore/kwq/KWQKURL.mm::appendEscapingBadChars(), which doesn't know about
%u-style escaping.
A patch similar to the following ought to fix the problem:
--- KWQKURL.mm.orig Mon Jan 9 17:43:02 2006
+++ KWQKURL.mm Mon Jan 9 17:46:04 2006
@@ -981,6 +981,16 @@
*p++ = c;
*p++ = *str++;
*p++ = *str++;
+ } else if (c == '%' && strEnd - str >= 5 &&
+ (str[0] == 'u' || str[0] == 'U') &&
+ isHexDigit(str[0]) && isHexDigit(str[1]) &&
+ isHexDigit(str[2]) && isHexDigit(str[3])) {
+ *p++ = c;
+ *p++ = *str++;
+ *p++ = *str++;
+ *p++ = *str++;
+ *p++ = *str++;
+ *p++ = *str++;
} else if (c == '?') {
*p++ = c;
} else {
--
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list