XML namespace merge bug fixed. Example: two xmlns attributes could both survive a merge whereas one should replace the other.

This commit is contained in:
Olof hagsand 2020-02-05 12:08:20 +01:00
parent e68753655b
commit 39e7f387f8
2 changed files with 3 additions and 1 deletions

View file

@ -31,6 +31,8 @@
### Corrected Bugs
* XML namespace merge bug fixed. Example: two xmlns attributes could both survive a merge whereas one should replace the other.
## 4.3.1 (2 February 2020)
Patch release based on testing by Dave Cornejo, Netgate

View file

@ -1216,7 +1216,7 @@ check_namespaces(cxobj *x0, /* source */
}
else{ /* No, namespace does not exist in x1 _parent_
* Check if it is exists in x1 itself */
if (nscache_get_prefix(x1, namespace, &pexist) == 1){
if (xml2prefix(x1, namespace, &pexist) == 1){
/* Yes it exists, but is it equal? */
if ((pexist == NULL && prefix0 == NULL) ||
(pexist && prefix0 &&