Skip to content
Snippets Groups Projects
Commit e9a09c15 authored by srosse's avatar srosse
Browse files

OO-5609: disable entities expansion in SCORM jdom reader

parent 2cf9651a
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,6 @@ import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.StringReader;
import java.util.Iterator;
import org.jdom.Document;
......@@ -116,22 +115,11 @@ public final class XMLUtils {
public static Document readXMLFile(File file) throws IOException, JDOMException {
Document doc = null;
SAXBuilder builder = new SAXBuilder();
builder.setExpandEntities(false);
// This allows UNC mapped locations to load
doc = builder.build(new FileInputStream(file));
return doc;
}
/**
* Reads and returns a JDOM Document from String without Schema Validation
* @param xmlString
* @return
* @throws JDOMException
* @throws IOException
*/
public static Document readXMLString(String xmlString) throws JDOMException, IOException {
SAXBuilder builder = new SAXBuilder();
return builder.build(new StringReader(xmlString));
}
/**
* @return The root Namespace in the Document or null if not found
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment