@@ -742,7 +742,6 @@ public void reset(final XMLComponentManager manager) throws XMLConfigurationExce
742
742
}
743
743
}
744
744
}
745
-
746
745
}
747
746
748
747
/** Sets a feature. */
@@ -2895,17 +2894,18 @@ protected boolean scanAttribute(final XMLAttributesImpl attributes, final boolea
2895
2894
if (fReportErrors_ ) {
2896
2895
fErrorReporter .reportError ("HTML1007" , null );
2897
2896
}
2898
- return false ;
2897
+ throw new EOFException () ;
2899
2898
}
2900
2899
if (c == '>' ) {
2901
2900
return false ;
2902
2901
}
2902
+
2903
+ // https://html.spec.whatwg.org/multipage/parsing.html#parse-error-unexpected-character-in-attribute-name
2903
2904
if (c == '<' ) {
2904
- fCurrentEntity .rewind ();
2905
2905
if (fReportErrors_ ) {
2906
2906
fErrorReporter .reportError ("HTML1016" , null );
2907
2907
}
2908
- return false ;
2908
+ // report but process as part of the attrib name
2909
2909
}
2910
2910
}
2911
2911
@@ -2937,13 +2937,14 @@ protected boolean scanAttribute(final XMLAttributesImpl attributes, final boolea
2937
2937
}
2938
2938
throw new EOFException ();
2939
2939
}
2940
- if (c == '/' || c == '>' ) {
2940
+ if (c == '/' ) {
2941
+ qName_ .setValues (null , aname , aname , null );
2942
+ attributes .addAttribute (qName_ , "CDATA" , "" , true );
2943
+ return true ;
2944
+ }
2945
+ if (c == '>' ) {
2941
2946
qName_ .setValues (null , aname , aname , null );
2942
2947
attributes .addAttribute (qName_ , "CDATA" , "" , true );
2943
- if (c == '/' ) {
2944
- fCurrentEntity .rewind ();
2945
- empty [0 ] = skipMarkup (false );
2946
- }
2947
2948
return false ;
2948
2949
}
2949
2950
if (c == '=' ) {
0 commit comments