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

Build description longer than 30 chars has hex zero width space added

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • core
    • None
    • Jenkins 1.596.1, 2.124
    • Jenkins 2.276

    Description

      We use a Groovy script to write the package version into the build description of a job after it completes. Users then copy this from the Jenkins UI and paste it to perform a deploy. I have discovered occasional strange issues with this where what seems to be a valid version number is not found by our deploy system. Eventually I figured out that Jenkins is inserting a

      ​

      in the string if it exceeds 30 chars. This is invisible (obviously) in the UI but gets captured when the text is selected and copied/pasted (at least with Chrome on MacOS). This is a problem because this copy-paste workflow has been embedded here for several years, and a recent Jenkins upgrade has thrown this entropy into it

      Attachments

        Issue Links

          Activity

            woldemar Vladimir Looze added a comment - - edited

            We had just encountered same problem once we started using Build Name Setter Plugin.
            Can confirm that workaround provided by encounter does the job - makes build names copy-pasteable.
            As far as I can see this is only reproducible in Build History panel. Everywhere else names of builds were displayed without ​​ in HTML.

            woldemar Vladimir Looze added a comment - - edited We had just encountered same problem once we started using Build Name Setter Plugin . Can confirm that workaround provided by encounter does the job - makes build names copy-pasteable. As far as I can see this is only reproducible in Build History panel. Everywhere else names of builds were displayed without ​ ​ in HTML.
            fatcash Alexej Ismailov added a comment - - edited

            Hi, thank you for the suggested workarounds. Pardon my inexperience, do I need to have a custom theme to put encounter's JS line? It won't work with stock theme?
            Also waiting for the complete solution, it stole a lot of hours to find the invisible character. Btw, for description the character appears after 30 char and for name (the bold text) its after 20.

            fatcash Alexej Ismailov added a comment - - edited Hi, thank you for the suggested workarounds. Pardon my inexperience, do I need to have a custom theme to put encounter 's JS line? It won't work with stock theme? Also waiting for the complete solution, it stole a lot of hours to find the invisible character. Btw, for description the character appears after 30 char and for name (the bold text) its after 20.
            markhu Mark Hudson added a comment -

            Still a problem in Jenkins 2.198 as of September 2020. Duped by JENKINS-40663 

            markhu Mark Hudson added a comment - Still a problem in Jenkins 2.198 as of September 2020. Duped by  JENKINS-40663  
            grzegorz_dubicki Greg Dubicki added a comment -

            I just created a PR for just removing zero-width space adding altogether: https://github.com/jenkinsci/jenkins/pull/5021/files

            grzegorz_dubicki Greg Dubicki added a comment - I just created a PR for just removing zero-width space adding altogether: https://github.com/jenkinsci/jenkins/pull/5021/files
            owenmehegan Owen Mehegan added a comment -

            Hallelujah.

            owenmehegan Owen Mehegan added a comment - Hallelujah.

            People

              Unassigned Unassigned
              owenmehegan Owen Mehegan
              Votes:
              19 Vote for this issue
              Watchers:
              25 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: