@@ -412,11 +412,6 @@ def tagNameState(self):
412412 self .stream .charsUntil (asciiLetters , True )
413413 elif data == u">" :
414414 self .emitCurrentToken ()
415- elif data == u"<" :
416- self .stream .queue .append (data )
417- self .tokenQueue .append ({"type" : "ParseError" , "data" :
418- _ ("Unexpected < character when getting the tag name." )})
419- self .emitCurrentToken ()
420415 elif data == EOF :
421416 self .tokenQueue .append ({"type" : "ParseError" , "data" :
422417 _ ("Unexpected end of file in the tag name." )})
@@ -439,11 +434,6 @@ def beforeAttributeNameState(self):
439434 self .emitCurrentToken ()
440435 elif data == u"/" :
441436 self .processSolidusInTag ()
442- elif data == u"<" :
443- self .stream .queue .append (data )
444- self .tokenQueue .append ({"type" : "ParseError" , "data" :
445- _ ("Unexpected < character. Expected attribute name instead." )})
446- self .emitCurrentToken ()
447437 elif data == EOF :
448438 self .tokenQueue .append ({"type" : "ParseError" , "data" :
449439 _ ("Unexpected end of file. Expected attribute name instead." )})
@@ -472,12 +462,6 @@ def attributeNameState(self):
472462 elif data == u"/" :
473463 self .processSolidusInTag ()
474464 self .state = self .states ["beforeAttributeName" ]
475- elif data == u"<" :
476- self .stream .queue .append (data )
477- self .tokenQueue .append ({"type" : "ParseError" , "data" :
478- _ ("Unexpected < character in attribute name." )})
479- self .emitCurrentToken ()
480- leavingThisState = False
481465 elif data == EOF :
482466 self .tokenQueue .append ({"type" : "ParseError" , "data" :
483467 _ ("Unexpected end of file in attribute name." )})
@@ -514,11 +498,6 @@ def afterAttributeNameState(self):
514498 elif data == u"/" :
515499 self .processSolidusInTag ()
516500 self .state = self .states ["beforeAttributeName" ]
517- elif data == u"<" :
518- self .stream .queue .append (data )
519- self .tokenQueue .append ({"type" : "ParseError" , "data" :
520- _ ("Unexpected < character. Expected = or end of tag." )})
521- self .emitCurrentToken ()
522501 elif data == EOF :
523502 self .tokenQueue .append ({"type" : "ParseError" , "data" :
524503 _ ("Unexpected end of file. Expected = or end of tag." )})
@@ -541,11 +520,6 @@ def beforeAttributeValueState(self):
541520 self .state = self .states ["attributeValueSingleQuoted" ]
542521 elif data == u">" :
543522 self .emitCurrentToken ()
544- elif data == u"<" :
545- self .stream .queue .append (data )
546- self .tokenQueue .append ({"type" : "ParseError" , "data" :
547- _ ("Unexpected < character. Expected attribute value." )})
548- self .emitCurrentToken ()
549523 elif data == EOF :
550524 self .tokenQueue .append ({"type" : "ParseError" , "data" :
551525 _ ("Unexpected end of file. Expected attribute value." )})
@@ -593,11 +567,6 @@ def attributeValueUnQuotedState(self):
593567 self .processEntityInAttribute ()
594568 elif data == u">" :
595569 self .emitCurrentToken ()
596- elif data == u"<" :
597- self .stream .queue .append (data )
598- self .tokenQueue .append ({"type" : "ParseError" , "data" :
599- _ ("Unexpected < character in attribute value." )})
600- self .emitCurrentToken ()
601570 elif data == EOF :
602571 self .tokenQueue .append ({"type" : "ParseError" , "data" :
603572 _ ("Unexpected end of file in attribute value." )})
0 commit comments