diff --git a/lib/xml-parser.ts b/lib/xml-parser.ts index f54085f..ea63a48 100644 --- a/lib/xml-parser.ts +++ b/lib/xml-parser.ts @@ -104,10 +104,12 @@ export function parseAttrs(string: string): Attribute[] { continue; case CHAR_COLON: + if (state) continue; if (idx >= colonIdx) colonIdx = i; continue; case CHAR_EQUAL: + if (state) continue; if (name) throw new Error(`Unexpected character at ${i}`); name = string.slice(idx, i).trim(); // TODO validate name