Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-48463

Jenkins should create xml 1.1 output in order to support control characters that are illegal in xml 1.0

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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

        Attachments

          Issue Links

            Activity

            Hide
            splatteredbits Aaron Jensen added a comment -

            Please roll this back. We automate Jenkins using .NET and it doesn't support XML 1.1. It won't even open/parse any XML 1.1 files.

            Show
            splatteredbits Aaron Jensen added a comment - Please roll this back. We automate Jenkins using .NET and it doesn't support XML 1.1. It won't even open/parse any XML 1.1 files.
            Hide
            splatteredbits Aaron Jensen added a comment -

            If the config.xml file format is considered internal, Jenkins shouldn't have APIs that expose it. That's not internal.

            Show
            splatteredbits Aaron Jensen added a comment - If the config.xml file format is considered internal, Jenkins shouldn't have APIs that expose it. That's not internal.
            Hide
            splatteredbits Aaron Jensen added a comment -

            Here's our use-case: Developers have certain golden paths for creating specific types of applications. We have templates in Jenkins for each type. Developers run a build to create a new application. We grab the config.xml from the template, update it to use values specific to the new job, then post that config.xml to Jenkins to create the job.

            Switching to the two plug-ins mentioned is a big under-taking. We have to learn Groovy and/or export our entire Jenkins configuration as YAML and write automation to apply it. Given enough warning, we could do it. This feature should be rolled back, then announced that it's coming with instructions on how to migrate to some way of managing job configurations without touching config.xml files. Then the config.xml file format can become internal and you can change to 1.1 if you want and this could get refiled as "allow job configuration to include control characters".

            Show
            splatteredbits Aaron Jensen added a comment - Here's our use-case: Developers have certain golden paths for creating specific types of applications. We have templates in Jenkins for each type. Developers run a build to create a new application. We grab the config.xml from the template, update it to use values specific to the new job, then post that config.xml to Jenkins to create the job. Switching to the two plug-ins mentioned is a big under-taking. We have to learn Groovy and/or export our entire Jenkins configuration as YAML and write automation to apply it. Given enough warning, we could do it. This feature should be rolled back, then announced that it's coming with instructions on how to migrate to some way of managing job configurations without touching config.xml files. Then the config.xml file format can become internal and you can change to 1.1 if you want and this could get refiled as "allow job configuration to include control characters".
            Hide
            rlamoni Andrew Lamonica added a comment -
            Show
            rlamoni Andrew Lamonica added a comment - Aaron Jensen , here is what we ended up doing.  https://paste.ofcode.org/3aPEN9YyVDEcCGM2JmX8zw
            Hide
            ioannis Ioannis Moutsatsos added a comment -

            You must note that most editors that work fine with XML 1.0 can't parse XML 1.1. After more than a decade successfully using the free MS utility XML Notepad for all XML tasks I may have to look for another editor. How much of a demand there was for this change?

            Show
            ioannis Ioannis Moutsatsos added a comment - You must note that most editors that work fine with XML 1.0 can't parse XML 1.1. After more than a decade successfully using the free MS utility XML Notepad for all XML tasks I may have to look for another editor. How much of a demand there was for this change?

              People

              • Assignee:
                mikecirioli mike cirioli
                Reporter:
                mikecirioli mike cirioli
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: