diff --git a/lib/xml-parser.ts b/lib/xml-parser.ts index 6e6ebff..f54085f 100644 --- a/lib/xml-parser.ts +++ b/lib/xml-parser.ts @@ -57,9 +57,9 @@ export function parseXmlDeclaration(buffer: Buffer): Attribute[] { for (const enc of encodings) { let str = buffer.toString(enc, 0, 150); if (str.startsWith("")); try { - return parseAttrs(str.slice(5, -2)); + return parseAttrs(str.slice(5)); } catch (err) { // Ignore }