Skip to content

Commit

Permalink
Use <base> in resolving url attributes (like "href").
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Mar 29, 2016
1 parent db95de6 commit 1060c42
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion components/script/dom/element.rs
Expand Up @@ -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) {
Expand Down
Expand Up @@ -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

0 comments on commit 1060c42

Please sign in to comment.