ladybird/Tests/LibWeb/Crash/HTML/meta-content-language-without-document-element.html
Tim Ledbetter 45ca0c1158 LibWeb: Skip meta http-equiv processing outside a document tree
The pragma directives specification steps should only run when a meta
element is inserted into the document, meaning it is in a document tree
after the insertion steps have run. We previously ran the pragma
algorithms for any insertion, so inserting a meta element with
`http-equiv=content-language` into a detached subtree dereferenced a
null document element.
2026-06-13 10:51:37 +12:00

13 lines
345 B
HTML

<!doctype html>
<script>
const documentElement = document.documentElement;
documentElement.remove();
const head = document.createElement("head");
const meta = document.createElement("meta");
meta.setAttribute("http-equiv", "content-language");
meta.setAttribute("content", "en");
head.append(meta);
document.append(documentElement);
</script>