summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMelanie Clements <melanielc@google.com>2010-08-31 10:10:56 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-08-31 10:10:56 -0700
commit0eb2314f8b27b9d07958b55fba1dc7d7264ae86a (patch)
treefc186218009c7196daaf126a996ae468488e1aba
parentec079933211eb47479b2624cb6be72257d178c01 (diff)
parentcd011297fda5b6f6093453d59c2624aaf878e2fb (diff)
downloadexternal_webkit-0eb2314f8b27b9d07958b55fba1dc7d7264ae86a.zip
external_webkit-0eb2314f8b27b9d07958b55fba1dc7d7264ae86a.tar.gz
external_webkit-0eb2314f8b27b9d07958b55fba1dc7d7264ae86a.tar.bz2
am cd011297: am ff93a851: Bug fix 2337042 <base> URL + <img> URL = URL that starts with "/."
Merge commit 'cd011297fda5b6f6093453d59c2624aaf878e2fb' * commit 'cd011297fda5b6f6093453d59c2624aaf878e2fb': Bug fix 2337042 <base> URL + <img> URL = URL that starts with "/."
-rw-r--r--WebCore/platform/KURL.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/WebCore/platform/KURL.cpp b/WebCore/platform/KURL.cpp
index 16b84b5..380cb41 100644
--- a/WebCore/platform/KURL.cpp
+++ b/WebCore/platform/KURL.cpp
@@ -1295,6 +1295,13 @@ void KURL::parse(const char* url, const String* originalString)
if (m_protocolInHTTPFamily && hierarchical && pathEnd == pathStart)
*p++ = '/';
+#if PLATFORM(ANDROID)
+ // Remove any trailing '.' from base, in order to conform to RFC 3986 section 5.4
+ if (p[-1] == '.') {
+ p--;
+ }
+#endif /* PLATFORM(ANDROID) */
+
// add path, escaping bad characters
if (!hierarchical || !hasSlashDotOrDotDot(url))
appendEscapingBadChars(p, url + pathStart, pathEnd - pathStart);