Merge pull request #12 from quamotion/fixes/dtd-processing

Ignore DTD when reading XML PList documents
This commit is contained in:
2016-07-09 14:25:56 +01:00
committed by GitHub

View File

@@ -72,7 +72,14 @@ namespace Claunia.PropertyList
public static NSObject Parse(Stream str)
{
XmlDocument doc = new XmlDocument();
doc.Load(str);
XmlReaderSettings settings = new XmlReaderSettings();
settings.DtdProcessing = DtdProcessing.Ignore;
using (XmlReader reader = XmlReader.Create(str, settings))
{
doc.Load(reader);
}
return ParseDocument(doc);
}