]> source.dussan.org Git - poi.git/commitdiff
setDisallowDocTypeDeclaration
authorPJ Fanning <fanningpj@apache.org>
Wed, 13 Oct 2021 23:00:44 +0000 (23:00 +0000)
committerPJ Fanning <fanningpj@apache.org>
Wed, 13 Oct 2021 23:00:44 +0000 (23:00 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894214 13f79535-47bb-0310-9956-ffa450edef68

poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLTypeLoader.java

index 4a7a2b1b7b46e25259a48207fef0971c44d87510..b30d4d0e0cf79dc7925b6f348b9d5b8985d17fc2 100644 (file)
@@ -40,6 +40,7 @@ public class POIXMLTypeLoader {
         DEFAULT_XML_OPTIONS.setUseDefaultNamespace();
         DEFAULT_XML_OPTIONS.setSaveAggressiveNamespaces();
         DEFAULT_XML_OPTIONS.setCharacterEncoding("UTF-8");
+        DEFAULT_XML_OPTIONS.setDisallowDocTypeDeclaration(true);
         DEFAULT_XML_OPTIONS.setEntityExpansionLimit(1);
         // Piccolo is disabled for POI builts, i.e. JAXP is used for parsing
         // so only user code using XmlObject/XmlToken.Factory.parse