mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-26 00:37:43 +03:00
entities: Add XML_ENT_PARSED flag
To check whether an entity was already parsed, the code previously tested whether "checked" was non-zero or "children" was non-null. The "children" check could be unreliable because an empty entity also results in an empty (NULL) node list. Use a separate flag to make this check more reliable.
This commit is contained in:
@@ -4,6 +4,14 @@
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xmlstring.h>
|
||||
|
||||
/*
|
||||
* Entity flags
|
||||
*
|
||||
* XML_ENT_PARSED: The entity was parsed and `children` points to the
|
||||
* content.
|
||||
*/
|
||||
#define XML_ENT_PARSED (1<<0)
|
||||
|
||||
XML_HIDDEN xmlChar *
|
||||
xmlEncodeAttributeEntities(xmlDocPtr doc, const xmlChar *input);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user