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
20 lines
536 B
HTML
20 lines
536 B
HTML
<!DOCTYPE html>
|
|
<title>Escape "<" 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=\"<>\"></a>");
|
|
}, "innerHTML");
|
|
|
|
test(() => {
|
|
assert_equals(test_el.outerHTML, "<span id=\"test\"><a b=\"<>\"></a></span>");
|
|
}, "outerHTML");
|
|
</script>
|