mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
- tree.c: applied Steve Tinney patch to xmlNewNsProp to fix bug #55810
Daniel
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Thu Jun 7 21:52:10 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
|
* tree.c: applied Steve Tinney patch to xmlNewNsProp to fix
|
||||||
|
bug #55810
|
||||||
|
|
||||||
Thu Jun 7 21:29:39 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
Thu Jun 7 21:29:39 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
* tree.c: fixed xmlGetNsProp() to close bug #55683
|
* tree.c: fixed xmlGetNsProp() to close bug #55683
|
||||||
|
11
tree.c
11
tree.c
@ -1042,6 +1042,7 @@ xmlAttrPtr
|
|||||||
xmlNewNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name,
|
xmlNewNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name,
|
||||||
const xmlChar *value) {
|
const xmlChar *value) {
|
||||||
xmlAttrPtr cur;
|
xmlAttrPtr cur;
|
||||||
|
xmlDocPtr doc = NULL;
|
||||||
|
|
||||||
if (name == NULL) {
|
if (name == NULL) {
|
||||||
#ifdef DEBUG_TREE
|
#ifdef DEBUG_TREE
|
||||||
@ -1064,16 +1065,18 @@ xmlNewNsProp(xmlNodePtr node, xmlNsPtr ns, const xmlChar *name,
|
|||||||
cur->type = XML_ATTRIBUTE_NODE;
|
cur->type = XML_ATTRIBUTE_NODE;
|
||||||
|
|
||||||
cur->parent = node;
|
cur->parent = node;
|
||||||
if (node != NULL)
|
if (node != NULL) {
|
||||||
cur->doc = node->doc;
|
doc = node->doc;
|
||||||
|
cur->doc = doc;
|
||||||
|
}
|
||||||
cur->ns = ns;
|
cur->ns = ns;
|
||||||
cur->name = xmlStrdup(name);
|
cur->name = xmlStrdup(name);
|
||||||
if (value != NULL) {
|
if (value != NULL) {
|
||||||
xmlChar *buffer;
|
xmlChar *buffer;
|
||||||
xmlNodePtr tmp;
|
xmlNodePtr tmp;
|
||||||
|
|
||||||
buffer = xmlEncodeEntitiesReentrant(node->doc, value);
|
buffer = xmlEncodeEntitiesReentrant(doc, value);
|
||||||
cur->children = xmlStringGetNodeList(node->doc, buffer);
|
cur->children = xmlStringGetNodeList(doc, buffer);
|
||||||
cur->last = NULL;
|
cur->last = NULL;
|
||||||
tmp = cur->children;
|
tmp = cur->children;
|
||||||
while (tmp != NULL) {
|
while (tmp != NULL) {
|
||||||
|
Reference in New Issue
Block a user