Files
sousa-gecko/testing/web-platform/tests/html/syntax/serializing-html-fragments/serializing-lt-gt.html
T
Simon Pieters ce1b63a72c Bug 1691006 [wpt PR 27501] - HTML: Escape "<" and ">" in attribute values when serializing,
Automatic update from web-platform-tests
HTML: Escape "<" and ">" in attribute values when serializing

See https://github.com/whatwg/html/pull/6362.
--

wpt-commits: 3fad71d22b6681a3430ff498add3ea8c31660401
wpt-pr: 27501

Differential Revision: https://phabricator.services.mozilla.com/D250932
2025-05-23 19:11:45 +00:00

20 lines
536 B
HTML

<!DOCTYPE html>
<title>Escape "&lt;" and ">" in attribute values when serializing</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<span id="test"><a b="<>"></a></span>
<script>
const test_el = document.getElementById("test");
test(() => {
assert_equals(test_el.innerHTML, "<a b=\"&lt;&gt;\"></a>");
}, "innerHTML");
test(() => {
assert_equals(test_el.outerHTML, "<span id=\"test\"><a b=\"&lt;&gt;\"></a></span>");
}, "outerHTML");
</script>