1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 07:28:09 +02:00
Files
archived-php-src/ext/dom
Niels Dossche 961e57eb60 Fix GH-11500: Namespace reuse in createElementNS() generates wrong output
When you construct a DOM tree containing subtrees which are constructed
top-down, this won't remove the redundant namespaces. That's because the
following conditions hold:
1) The namespace are reused from the doc->oldNs list.
2) Therefore during reconciliation no nsDef field is set, so no redundant
   namespaces are removed by our reconciliation code.

Furthermore, it would only be fixed up automatically if the tree wasn't
added in bottom-up way, or if it had been constructed bottom-up from the
start.

Fix it by setting a flag to remove redundant namespaces in the libxml2
reconciliation call.
Since removing redundant namespaces may have a performance cost, we only do
this after performing a simple check.

Closes GH-11528.
2023-06-26 19:48:40 +02:00
..
2023-06-19 19:45:24 +02:00
2021-05-06 12:16:35 +02:00
2023-06-19 19:45:24 +02:00
2023-06-18 15:21:12 +02:00
2023-06-18 15:21:12 +02:00
2023-05-29 19:00:57 +02:00
2023-06-18 15:21:12 +02:00
2023-05-29 19:00:57 +02:00
2021-05-06 12:16:35 +02:00