mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
* Headers/Foundation/NSXMLNodeOptions.h: Add new 10.7 options.
* Source/NSXMLDocument.m: Use XML_PARSE_NONET as the default option for xmlReadMemory. Add XML_PARSE_NOENT when NSXMLNodeLoadExternalEntitiesNever is set. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37792 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7bf71c0466
commit
be29047e59
3 changed files with 26 additions and 1 deletions
|
@ -128,6 +128,15 @@ GS_PRIVATE_INTERNAL(NSXMLDocument)
|
|||
xmlOptions |= XML_PARSE_NOBLANKS;
|
||||
//xmlKeepBlanksDefault(0);
|
||||
}
|
||||
if (mask & NSXMLNodeLoadExternalEntitiesNever)
|
||||
{
|
||||
xmlOptions |= XML_PARSE_NOENT;
|
||||
}
|
||||
if (!(mask & NSXMLNodeLoadExternalEntitiesAlways))
|
||||
{
|
||||
xmlOptions |= XML_PARSE_NONET;
|
||||
}
|
||||
|
||||
doc = xmlReadMemory([data bytes], [data length],
|
||||
url, encoding, xmlOptions);
|
||||
if (doc == NULL)
|
||||
|
@ -425,7 +434,7 @@ GS_PRIVATE_INTERNAL(NSXMLDocument)
|
|||
#ifdef HAVE_LIBXSLT
|
||||
xmlChar **params = NULL;
|
||||
xmlDocPtr stylesheetDoc = xmlReadMemory([xslt bytes], [xslt length],
|
||||
NULL, NULL, XML_PARSE_NOERROR);
|
||||
NULL, NULL, XML_PARSE_NOERROR | XML_PARSE_NONET);
|
||||
xsltStylesheetPtr stylesheet = xsltParseStylesheetDoc(stylesheetDoc);
|
||||
xmlDocPtr resultDoc = NULL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue