File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -865,8 +865,13 @@ private function attributeNameState() {
865
865
character (add 0x0020 to the character's code point) to
866
866
the current attribute's name. Stay in the attribute name
867
867
state. */
868
+ $ len = strspn ($ this ->data , self ::UPPER_ALPHA , $ this ->char + 1 );
869
+ $ char = substr ($ this ->data , $ this ->char + 1 , $ len );
870
+
871
+ $ this ->char += $ len ;
872
+
868
873
$ last = count ($ this ->token ['attr ' ]) - 1 ;
869
- $ this ->token ['attr ' ][$ last ]['name ' ] .= strtolower ($ char );
874
+ $ this ->token ['attr ' ][$ last ]['name ' ] .= strtolower ($ this -> c . $ char );
870
875
871
876
$ this ->state = 'attributeName ' ;
872
877
@@ -887,8 +892,13 @@ private function attributeNameState() {
887
892
/* Anything else
888
893
Append the current input character to the current attribute's name.
889
894
Stay in the attribute name state. */
895
+ $ len = strcspn ($ this ->data , "\t\n\x0c /=> \"' " . self ::UPPER_ALPHA , $ this ->char + 1 );
896
+ $ char = substr ($ this ->data , $ this ->char + 1 , $ len );
897
+
898
+ $ this ->char += $ len ;
899
+
890
900
$ last = count ($ this ->token ['attr ' ]) - 1 ;
891
- $ this ->token ['attr ' ][$ last ]['name ' ] .= $ char ;
901
+ $ this ->token ['attr ' ][$ last ]['name ' ] .= $ this -> c . $ char ;
892
902
893
903
$ this ->state = 'attributeName ' ;
894
904
}
You can’t perform that action at this time.
0 commit comments