summaryrefslogtreecommitdiffstats
path: root/contrib/xml2/xpath.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 19:16:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 19:16:24 +0000
commit2a0f262beff32ba86bcb58f3273214e5d0517c09 (patch)
tree24c0ad10dab36bbd5c22743d3c88c4e0ccd5bc65 /contrib/xml2/xpath.c
parentReleasing progress-linux version 16.2-2~progress7.99u1. (diff)
downloadpostgresql-16-2a0f262beff32ba86bcb58f3273214e5d0517c09.tar.xz
postgresql-16-2a0f262beff32ba86bcb58f3273214e5d0517c09.zip
Merging upstream version 16.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--contrib/xml2/xpath.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c
index 9464193..b999b1f 100644
--- a/contrib/xml2/xpath.c
+++ b/contrib/xml2/xpath.c
@@ -74,8 +74,6 @@ pgxml_parser_init(PgXmlStrictness strictness)
/* Initialize libxml */
xmlInitParser();
- xmlSubstituteEntitiesDefault(1);
-
return xmlerrcxt;
}
@@ -379,8 +377,9 @@ pgxml_xpath(text *document, xmlChar *xpath, xpath_workspace *workspace)
PG_TRY();
{
- workspace->doctree = xmlParseMemory((char *) VARDATA_ANY(document),
- docsize);
+ workspace->doctree = xmlReadMemory((char *) VARDATA_ANY(document),
+ docsize, NULL, NULL,
+ XML_PARSE_NOENT);
if (workspace->doctree != NULL)
{
workspace->ctxt = xmlXPathNewContext(workspace->doctree);
@@ -623,7 +622,9 @@ xpath_table(PG_FUNCTION_ARGS)
/* Parse the document */
if (xmldoc)
- doctree = xmlParseMemory(xmldoc, strlen(xmldoc));
+ doctree = xmlReadMemory(xmldoc, strlen(xmldoc),
+ NULL, NULL,
+ XML_PARSE_NOENT);
else /* treat NULL as not well-formed */
doctree = NULL;