The current implementation of XmlFile.java emits an XML 1.0 header, which breaks things like Move/Copy/Promote if the user has included any characters that are illegal in XML 1.0 (such as Control-XX, etc) in their jobs.
XStream, which is used for serialization/deserialization, deals with XML fragments, and doesn't have an issue reading/writing this non well-formed XML. Changing XmlFile.java so that it creates xml 1.1 here will allow jenkins config files to support these special characters. This also requires updating the underlying XML Pull Parser being used by XStream to something that support XML v1.1
- relates to
-
JENKINS-54146 Job History Plugin 2.18.2 - XML view not working
-
- Resolved
-
-
JENKINS-50358 While downgrading Jenkins version 2.112 to 2.101 getting eror
-
- Resolved
-
-
JENKINS-71139 XStream2 unable to round-trip ASCII NUL in stdout/stderr in junitResult.xml
-
- Closed
-
- links to
[JENKINS-48463] Jenkins should create xml 1.1 output in order to support control characters that are illegal in xml 1.0
Remote Link | New: This issue links to "Pull Request #3185 (Web Link)" [ 19332 ] |
Remote Link | New: This issue links to "CloudBees Internal OSS-2590 (Web Link)" [ 19334 ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Note: Benchmarks comparing XML Parser performance can be found here: http://x-stream.github.io/benchmarks.html
Previously Jenkins was using XPP (Xpp3 min 1.1.4c), and has now been switched to XPP (kXML2 min 2.3.0). Investigating the use of other drivers my be useful in the future for even greater performance gains (assuming they support XML v1.1). Currently there are limitations in the drivers we can use because of forked XStream dependency.