netliomax25-code opened a new pull request, #2624: URL: https://github.com/apache/groovy/pull/2624
XmlNodePrinter escapes element text and ordinary attribute values, but printNamespace writes the namespace URI straight to the output. When a parsed node carries a namespace URI containing an XML metacharacter such as & or < (for example xmlns:foo="http://example.com/ns?a=1&b=2"), the printer emits the literal character and the result is no longer well formed, so re-parsing the output fails. The URI is an attribute value, so route it through the existing printEscaped path used for other attribute values; a round-trip test covers & and < in a declared namespace. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
