[webkit-changes] [WebKit/WebKit] 74c184: Correct URL encoding of <base> elements
Anne van Kesteren
noreply at github.com
Sat Sep 2 10:28:32 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 74c184818206247ddf6be2dc4fb14dc6be50d1e0
https://github.com/WebKit/WebKit/commit/74c184818206247ddf6be2dc4fb14dc6be50d1e0
Author: Anne van Kesteren <annevk at annevk.nl>
Date: 2023-09-02 (Sat, 02 Sep 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/windows-1251_include=base-href-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/windows-1252_include=base-href-expected.txt
M Source/WebCore/dom/Document.cpp
M Source/WebCore/html/HTMLBaseElement.cpp
M Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp
Log Message:
-----------
Correct URL encoding of <base> elements
https://bugs.webkit.org/show_bug.cgi?id=261060
rdar://114861187
Reviewed by Chris Dumez.
HTMLBaseElement::href and Document::processBaseElement can both invoke
Document::completeURL safely when they use an explicit base URL. That
in turn ensures Document::completeURL can take care of the encoding
requirements.
Also, there is no need to trim ASCII whitespace as the URL parser
already takes care of that.
This aligns us with the HTML standard and Gecko.
* LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/windows-1251_include=base-href-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/windows-1252_include=base-href-expected.txt:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::processBaseElement):
(WebCore::Document::completeURL const):
* Source/WebCore/html/HTMLBaseElement.cpp:
(WebCore::HTMLBaseElement::href const):
* Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::openFunc):
Canonical link: https://commits.webkit.org/267585@main
More information about the webkit-changes
mailing list