Use <base> in resolving url attributes (like "href").

This commit is contained in:
Eduard Burtescu 2016-03-29 13:44:38 +03:00
parent db95de6e58
commit 1060c42225
2 changed files with 1 additions and 4 deletions

View file

@ -1078,7 +1078,7 @@ impl Element {
} }
let url = self.get_string_attribute(local_name); let url = self.get_string_attribute(local_name);
let doc = document_from_node(self); let doc = document_from_node(self);
let base = doc.url(); let base = doc.base_url();
// https://html.spec.whatwg.org/multipage/#reflect // https://html.spec.whatwg.org/multipage/#reflect
// XXXManishearth this doesn't handle `javascript:` urls properly // XXXManishearth this doesn't handle `javascript:` urls properly
match base.join(&url) { match base.join(&url) {

View file

@ -3,6 +3,3 @@
[The href attribute of the base element is specified] [The href attribute of the base element is specified]
expected: FAIL expected: FAIL
[The src attribute of the img element must relative to the href attribute of the base element]
expected: FAIL