OSDN Git Service

Bug fix 2337042 <base> URL + <img> URL = URL that starts with "/."
authorMelanie Clements <melanielc@google.com>
Fri, 20 Aug 2010 18:19:20 +0000 (14:19 -0400)
committerJean-Baptiste Queru <jbq@google.com>
Mon, 30 Aug 2010 21:54:01 +0000 (14:54 -0700)
commitff93a851c578d0b570c84b3a83a41a4930e7107c
tree0c45fb507e0b5153bd97cb18eefd12e7ede298a7
parent5dc34a8555dde1ae4a2c174870c4296cc44f8a22
Bug fix 2337042 <base> URL + <img> URL = URL that starts with "/."

The Android browser inserts "/." at the beginning of the URL path
when processing an <img>  in an HTML document with a <base> tag.
This does not cause any errors but should be fixed to comply with
RFC 3986 section 5.4.

This only happens at the first pass of the URL parsing, at the second
pass where the base and path are parsed together this is dealt with
correctly.  I am therefore fixing it by modifying the parse() method
in KURL to check for a trailing '.' at the end of the base segment.

Change-Id: I0d641c8619e00aa2b08a33e271ef863cee5ed7ad
WebCore/platform/KURL.cpp