diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-05-09 03:25:24 +0200 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-05-09 03:25:24 +0200 |
commit | b8961df65d077457863780892f2d39ac4c04c0af (patch) | |
tree | c93913ab319744ece3832bb0a35bb1267bb23c1a | |
parent | f24ffddbb915121d70d9cb77761339148fce1eec (diff) | |
download | libxml2-b8961df65d077457863780892f2d39ac4c04c0af.tar.gz |
SAX: Always validate xml:ids
The behavior shouldn't depend on mostly random configuration options.
-rw-r--r-- | SAX2.c | 4 | ||||
-rw-r--r-- | include/libxml/tree.h | 6 | ||||
-rw-r--r-- | tree.c | 2 |
3 files changed, 0 insertions, 12 deletions
@@ -2174,15 +2174,11 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt, * * Open issue: normalization of the value. */ -#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED) -#ifdef LIBXML_VALID_ENABLED if (xmlValidateNCName(content, 1) != 0) { xmlErrValid(ctxt, XML_DTD_XMLID_VALUE, "xml:id : attribute value %s is not an NCName\n", (const char *) content, NULL); } -#endif -#endif xmlAddID(&ctxt->vctxt, ctxt->myDoc, content, ret); } else if (xmlIsID(ctxt->myDoc, ctxt->node, ret)) { xmlAddID(&ctxt->vctxt, ctxt->myDoc, content, ret); diff --git a/include/libxml/tree.h b/include/libxml/tree.h index b4989667..a1cabf69 100644 --- a/include/libxml/tree.h +++ b/include/libxml/tree.h @@ -657,15 +657,9 @@ struct _xmlDOMWrapCtxt { /* * Some helper functions */ -#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || \ - defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || \ - defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || \ - defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || \ - defined(LIBXML_LEGACY_ENABLED) XMLPUBFUN int xmlValidateNCName (const xmlChar *value, int space); -#endif #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) XMLPUBFUN int @@ -357,7 +357,6 @@ xmlSplitQName3(const xmlChar *name, int *len) { #define CUR_SCHAR(s, l) xmlStringCurrentChar(NULL, s, &l) -#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED) /** * xmlValidateNCName: * @value: the value to check @@ -429,7 +428,6 @@ try_complex: return(0); } -#endif #if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) /** |