-
-
Notifications
You must be signed in to change notification settings - Fork 355
Closed
Description
- Are you running the latest version?
- Have you included sample input, output, error, and expected output?
- Have you checked if you are using correct configuration?
- Did you try online tool?
- Have you checked the docs for helpful APIs and examples?
Description
HTML numeric entities that are outside basic multilingual plane (U+0000 - U+FFFF) are truncated to their lower two bytes, e.g. U+1F60A (😊) is truncated to U+F60A.
Input
<?xml version="1.0" encoding="UTF-8"?>
<note>😊😋</note>Code
const options = {
attributeNamePrefix: "",
ignoreAttributes: false,
processEntities: true,
htmlEntities: true,
};
const parser = new XMLParser(options);
let result = parser.parse(xmlData);
console.dir(result);Output
{ "?xml": { version: "1.0", encoding: "UTF-8" }, note: "" }For clarity, the 'note' field has values of U+F60A U+F60B instead of expected emoji values U+1F60A U+1F60B (😊😋).
expected data
{ '?xml': { version: "1.0", encoding: "UTF-8" }, note: "😊😋" }Would you like to work on this issue?
- Yes
- No
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels