added --nonet option fixing #112803 by adding --nonet when calling
* xmllint.c doc/xmllint.xml: added --nonet option
* doc/Makefile.am: fixing #112803 by adding --nonet when calling
xsltproc or xmllint
* doc/xmllint.xml doc/xmllint.1: also added --schema doc and
rebuilt
* HTMLparser.c: cleaned up the HTML parser context build when
using an URL
Daniel
diff --git a/xmllint.c b/xmllint.c
index 9fedb4f..1a87115 100644
--- a/xmllint.c
+++ b/xmllint.c
@@ -1260,6 +1260,7 @@
printf("\t--recover : output what was parsable on broken XML documents\n");
printf("\t--noent : substitute entity references by their value\n");
printf("\t--noout : don't output the result tree\n");
+ printf("\t--nonet : refuse to fetch DTDs or entities over network\n");
printf("\t--htmlout : output results as HTML\n");
printf("\t--nowrap : do not put HTML doc wrapper\n");
printf("\t--valid : validate the document in addition to std well-formed check\n");
@@ -1513,6 +1514,9 @@
schema = argv[i];
noent++;
#endif
+ } else if ((!strcmp(argv[i], "-nonet")) ||
+ (!strcmp(argv[i], "--nonet"))) {
+ xmlSetExternalEntityLoader(xmlNoNetExternalEntityLoader);
} else {
fprintf(stderr, "Unknown option %s\n", argv[i]);
usage(argv[0]);