[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 07:52:05 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 73b270e8fe18aef51625cb09ab8129b8d76ed26c
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Aug 18 14:50:38 2003 +0000
Reviewed by Maciej.
- fixed 3366542 -- filename with non-ASCII name left out of Content-Disposition for <input type=file>
* khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::formData):
Do the &-encoding thing on the filename. This is what Gecko does.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index bf6b295..564c33c 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,12 @@
+2003-08-17 Darin Adler <darin at apple.com>
+
+ Reviewed by Maciej.
+
+ - fixed 3366542 -- filename with non-ASCII name left out of Content-Disposition for <input type=file>
+
+ * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::formData):
+ Do the &-encoding thing on the filename. This is what Gecko does.
+
2003-08-14 Maciej Stachowiak <mjs at apple.com>
Fixed by Darin, reviewed by me (and originally figured out by John).
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index bf6b295..564c33c 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,12 @@
+2003-08-17 Darin Adler <darin at apple.com>
+
+ Reviewed by Maciej.
+
+ - fixed 3366542 -- filename with non-ASCII name left out of Content-Disposition for <input type=file>
+
+ * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::formData):
+ Do the &-encoding thing on the filename. This is what Gecko does.
+
2003-08-14 Maciej Stachowiak <mjs at apple.com>
Fixed by Darin, reviewed by me (and originally figured out by John).
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index 8426b68..8740101 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -346,7 +346,21 @@ QByteArray HTMLFormElementImpl::formData(bool& ok)
{
QString path = static_cast<HTMLInputElementImpl*>(current)->value().string();
if (path.length()) fileUploads << path;
- QString onlyfilename = path.mid(path.findRev('/')+1);
+
+ // Turn non-ASCII characters into &-escaped form.
+ // This doesn't work perfectly, because it doesn't escape &, for example.
+ // But it seems to be what Gecko does.
+ QString onlyfilename;
+ for (uint i = path.findRev('/') + 1; i < path.length(); ++i) {
+ QChar c = path.at(i).unicode();
+ if (c.unicode() >= 0x20 && c.unicode() <= 0x7F) {
+ onlyfilename.append(&c, 1);
+ } else {
+ QString ampersandEscape;
+ ampersandEscape.sprintf("&%hu;", c.unicode());
+ onlyfilename.append(ampersandEscape);
+ }
+ }
// FIXME: This won't work if the filename includes a " mark,
// or control characters like CR or LF.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list