mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibXML: Prevent auto-detection of UTF-32 encoding by libxml2
This commit is contained in:
committed by
Jelle Raaijmakers
parent
0d22b6cee5
commit
a48aa62b7a
Notes:
github-actions[bot]
2026-01-08 09:07:40 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/a48aa62b7ab Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7373 Reviewed-by: https://github.com/gmta ✅
19
Tests/LibWeb/Text/input/XML/xml-utf32-encoding-ignored.html
Normal file
19
Tests/LibWeb/Text/input/XML/xml-utf32-encoding-ignored.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const parser = new DOMParser();
|
||||
|
||||
const doc1 = parser.parseFromString("<root/>", "application/xml");
|
||||
println(`Normal XML: characterSet=${doc1.characterSet}, element=${doc1.documentElement.localName}`);
|
||||
|
||||
const doc2 = parser.parseFromString('<?xml version="1.0" encoding="UTF-32"?><root/>', "application/xml");
|
||||
println(`UTF-32 declared: characterSet=${doc2.characterSet}, element=${doc2.documentElement.localName}`);
|
||||
|
||||
const doc3 = parser.parseFromString('<?xml version="1.0" encoding="UTF-32BE"?><root/>', "application/xml");
|
||||
println(`UTF-32BE declared: characterSet=${doc3.characterSet}, element=${doc3.documentElement.localName}`);
|
||||
|
||||
const doc4 = parser.parseFromString('<?xml version="1.0" encoding="UTF-32LE"?><root/>', "application/xml");
|
||||
println(`UTF-32LE declared: characterSet=${doc4.characterSet}, element=${doc4.documentElement.localName}`);
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user