mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Don't crash when cloning a CDATASection node
This commit is contained in:
parent
cdfc7a92f7
commit
72ed62a560
Notes:
github-actions[bot]
2024-07-25 14:58:32 +00:00
Author: https://github.com/tcl3
Commit: 72ed62a560
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/798
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/trflynn89
3 changed files with 15 additions and 3 deletions
9
Tests/LibWeb/Text/input/DOM/CDATASection-cloneNode.html
Normal file
9
Tests/LibWeb/Text/input/DOM/CDATASection-cloneNode.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const xmlDocument = new DOMParser().parseFromString(`<xml></xml>`, "application/xml");
|
||||
const cdata = xmlDocument.createCDATASection("PASS");
|
||||
const clone = cdata.cloneNode();
|
||||
println(`Cloned CDATASection node data: ${clone.data}`);
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue