mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #10247 - eddyb:document-base-url, r=Ms2ger
Use <base> in resolving url attributes (like "href"). Second take of #6303, now that the `base_url` infrastructure is in place. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10247) <!-- Reviewable:end -->
This commit is contained in:
commit
c4e112a3be
2 changed files with 1 additions and 4 deletions
|
@ -1078,7 +1078,7 @@ impl Element {
|
|||
}
|
||||
let url = self.get_string_attribute(local_name);
|
||||
let doc = document_from_node(self);
|
||||
let base = doc.url();
|
||||
let base = doc.base_url();
|
||||
// https://html.spec.whatwg.org/multipage/#reflect
|
||||
// XXXManishearth this doesn't handle `javascript:` urls properly
|
||||
match base.join(&url) {
|
||||
|
|
|
@ -3,6 +3,3 @@
|
|||
[The href attribute of the base element is specified]
|
||||
expected: FAIL
|
||||
|
||||
[The src attribute of the img element must relative to the href attribute of the base element]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue