From 183d8a026b0cd83e80dac5c7347457b7420e5091 Mon Sep 17 00:00:00 2001 From: James Addison Date: Tue, 29 Dec 2020 14:44:34 +0000 Subject: [PATCH] Consistency: consume a single character at a time during attribute name state --- html5lib/_tokenizer.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/html5lib/_tokenizer.py b/html5lib/_tokenizer.py index 4748a197..f65cbb21 100644 --- a/html5lib/_tokenizer.py +++ b/html5lib/_tokenizer.py @@ -891,8 +891,7 @@ def attributeNameState(self): if data == "=": self.state = self.beforeAttributeValueState elif data in asciiLetters: - self.currentToken["data"][-1][0] += data +\ - self.stream.charsUntil(asciiLetters, True) + self.currentToken["data"][-1][0] += data leavingThisState = False elif data == ">": # XXX If we emit here the attributes are converted to a dict