mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-03 07:32:00 +00:00
In particular, there was an assertion failure due to the temporary parser document's "about base URL" being empty when trying to "parse a URL" during parsing. We fix this by copying the context element's document's about base URL to the temporary parsing document while parsing a fragment. This fixes a crash when loading search results on https://amazon.com/
14 lines
426 B
HTML
14 lines
426 B
HTML
<iframe id="ifr" srcdoc=""></iframe>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
ifr.contentDocument.body.innerHTML = "<a href='foo.html'>foo</a>";
|
|
let href = ifr.contentDocument.body.querySelector("a").href;
|
|
if (href.endsWith("foo.html")) {
|
|
println("PASS (Didn't crash)");
|
|
} else {
|
|
println("FAIL");
|
|
}
|
|
ifr.remove();
|
|
});
|
|
</script>
|