fix: remove validation on start/end tag matching (#3513)

This commit is contained in:
Connor Tumbleson 2024-02-13 06:03:31 -05:00 committed by GitHub
parent 93e100e0fc
commit d892f3daf9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -702,11 +702,6 @@ public class MXSerializer implements XmlSerializer {
if (checkNamesInterned && namesInterned) { if (checkNamesInterned && namesInterned) {
checkInterning(name); checkInterning(name);
} }
String startTagName = elName[depth];
if ((!namesInterned && !name.equals(startTagName)) || (namesInterned && name != startTagName)) {
throw new IllegalArgumentException("expected element name "
+ printable(elName[depth]) + " and not " + printable(name) + getLocation());
}
if (startTagIncomplete) { if (startTagIncomplete) {
writeNamespaceDeclarations(); writeNamespaceDeclarations();
out.write(" />"); // space is added to make it easier to work in XHTML!!! out.write(" />"); // space is added to make it easier to work in XHTML!!!