]> git.kaiwu.me - njs.git/commit
XML: return complete attribute values
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 16 Sep 2026 23:17:58 +0000 (16:17 -0700)
committerDmitry Volyntsev <xeioex@nginx.com>
Wed, 30 Sep 2026 18:56:44 +0000 (11:56 -0700)
commitaaf322c9d0fb7c753223d5d628ddcedea8a00e84
tree1662ea1942bc34b3763af38fa13eda81d428ba1c
parent77f8e260c04b2402006a4b644c86e1af79c87b7e
XML: return complete attribute values

Previously, $attr$ returned undefined for attributes containing entity
references, while $attrs returned only the first text fragment. libxml2
canonicalization expands the complete attribute value, creating an
interpretation difference for signed XML consumers.

Use xmlNodeGetContent() for both getters in the njs and QuickJS backends.
This preserves the existing explicit-attribute lookup and makes the
JavaScript value agree with canonicalization.
external/njs_xml_module.c
external/qjs_xml_module.c
test/xml/saml_verify.t.mjs
test/xml/xml.t.mjs