Skip to content

Commit 96546b5

Browse files
committed
1 parent 757fa24 commit 96546b5

File tree

1 file changed

+12
-1
lines changed
  • grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/io/support

1 file changed

+12
-1
lines changed

grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/io/support/IOUtils.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,20 @@ private static SAXParserFactory createParserFactory() throws ParserConfiguration
365365
saxParserFactory = FactorySupport.createSaxParserFactory();
366366
saxParserFactory.setNamespaceAware(true);
367367
saxParserFactory.setValidating(false);
368+
saxParserFactory.setXIncludeAware(false);
368369

369370
try {
370-
saxParserFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
371+
saxParserFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false);
372+
} catch (Exception pce) {
373+
// ignore, parser doesn't support
374+
}
375+
try {
376+
saxParserFactory.setFeature("http://xml.org/sax/features/external-general-entities", false);
377+
} catch (Exception pce) {
378+
// ignore, parser doesn't support
379+
}
380+
try {
381+
saxParserFactory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
371382
} catch (Exception pce) {
372383
// ignore, parser doesn't support
373384
}

0 commit comments

Comments
 (0)