Fix Attribute Name state for NULL character

The attribute should not be finalised here, since its value wasn't reached yet
This commit is contained in:
iska
2014-11-01 22:22:38 +01:00
parent 477af1f4ab
commit 0ea6eb2b4e
+2 -3
View File
@@ -1304,14 +1304,13 @@
[self switchToState:HTMLTokenizerStateAttributeName];
return;
case NULL_CHAR:
[self emitParseError:@"NULL character (0x0000) in Before Attribute Name state"];
[self finalizeCurrentAttribute];
[self emitParseError:@"NULL character (0x0000) in Attribute Name state"];
[self appendToCurrentAttributeName:StringFromUniChar(REPLACEMENT_CHAR)];
return;
case QUOTATION_MARK:
case APOSTROPHE:
case LESS_THAN_SIGN:
[self emitParseError:@"Unexpected character (%C) in Before Attribute Name state", (unichar)character];
[self emitParseError:@"Unexpected character (%C) in Attribute Name state", (unichar)character];
break;
case EOF:
[self emitParseError:@"EOF reached in Attribute Name state"];