From 74e2651811c5ff969b782417a1632e03e67b5969 Mon Sep 17 00:00:00 2001 From: jhulford Date: Sat, 14 Dec 2024 03:26:00 -0600 Subject: [PATCH] Fixes entity parsing when used in strict mode (#699) --- src/xmlparser/DocTypeReader.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xmlparser/DocTypeReader.js b/src/xmlparser/DocTypeReader.js index bcf9dee4..bfde18e8 100644 --- a/src/xmlparser/DocTypeReader.js +++ b/src/xmlparser/DocTypeReader.js @@ -19,6 +19,7 @@ function readDocType(xmlData, i){ if (xmlData[i] === '<' && !comment) { //Determine the tag type if( hasBody && isEntity(xmlData, i)){ i += 7; + let entityName, val; [entityName, val,i] = readEntityExp(xmlData,i+1); if(val.indexOf("&") === -1) //Parameter entities are not supported entities[ validateEntityName(entityName) ] = {