Disable XML validation and external DTD loading in TMXMapReader

This is because of a weird error, that only happens, when the jar is built manually somehow...
This commit is contained in:
OMGeeky
2025-02-15 01:17:59 +01:00
parent 7965ecb4f1
commit 9097b97316

View File

@@ -821,6 +821,8 @@ public class TMXMapReader
factory.setIgnoringComments(true);
factory.setIgnoringElementContentWhitespace(true);
factory.setExpandEntityReferences(false);
factory.setValidating(false);
factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
DocumentBuilder builder = factory.newDocumentBuilder();
builder.setEntityResolver(entityResolver);
InputSource insrc = new InputSource(in);