Skip to content

Commit

Permalink
BATIK-1284: Dont load DTDs in NodePickerPanel
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/batik/trunk@1878396 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
simonsteiner1984 committed Jun 2, 2020
1 parent f16e092 commit 0ef5b66
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -847,8 +847,10 @@ private Element parseXml(String xmlString) {
Document doc = null;
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try {
javax.xml.parsers.DocumentBuilder parser = factory
.newDocumentBuilder();
factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
javax.xml.parsers.DocumentBuilder parser = factory.newDocumentBuilder();
parser.setErrorHandler(new ErrorHandler() {
public void error(SAXParseException exception)
throws SAXException {
Expand Down

0 comments on commit 0ef5b66

Please sign in to comment.