[JIRA] [core] (JENKINS-28022) Build description longer than 30 chars has hex zero width space added

13 views
Skip to first unread message

tinrow@gmail.com (JIRA)

unread,
Nov 19, 2015, 10:03:02 PM11/19/15
to jenkinsc...@googlegroups.com
Kevin Wang commented on Bug JENKINS-28022
 
Re: Build description longer than 30 chars has hex zero width space added

Anyone looking at this problem? We are using copy-paste workflow and encountered this problem

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

owen@nerdnetworks.org (JIRA)

unread,
Dec 18, 2015, 5:05:02 PM12/18/15
to jenkinsc...@googlegroups.com

Tom FENNELLY do you have any thoughts on this? In Chrome this feature does not actually cause the text to wrap, so we get zero width spaces in the string and nothing else in return, it seems.

owen@nerdnetworks.org (JIRA)

unread,
Dec 18, 2015, 5:12:01 PM12/18/15
to jenkinsc...@googlegroups.com

I take it back - if the build description is just a steady string of alpha characters, it seems to wrap as intended. But when we set the description to the version string that we generate internally (our use case for this), it doesn't wrap at 30 chars. Maybe this is because we always have . and + in the string, among other non-alphanum characters.

owen@nerdnetworks.org (JIRA)

unread,
Dec 18, 2015, 5:14:01 PM12/18/15
to jenkinsc...@googlegroups.com
owenmehegan edited a comment on Bug JENKINS-28022
I take it back - if the build description is just a steady string of alpha characters, it seems to wrap as intended. But when we set the description to the version string that we generate internally (our use case for this), it doesn't wrap at 30 chars. Maybe this is because we always have . and + in the string, among other non-alphanum characters.  I just wish there was a better way to get the text to wrap nicely without screwing up the string when we copy and paste it. I had to add a bunch of defensive code to our deploy system so it wouldn't choke on these strings.

gtirloni@ret.cx (JIRA)

unread,
Mar 1, 2018, 3:30:03 PM3/1/18
to jenkinsc...@googlegroups.com

We've faced this issue on Jenkins 2.8.4 with the GitHub PR Builder plugin where we add the PR's URL to the description. People copy and paste it into their browser's window and, instead of going to the page, Chrome/Firefox won't consider it a URL and instead search for that value.

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

luke.street@encounterpc.com (JIRA)

unread,
Jun 7, 2018, 5:15:03 PM6/7/18
to jenkinsc...@googlegroups.com

We were able to work around this issue by adding the following to our custom theme JS:

insertZeroWidthSpacesInElementText=function(){}

patrickdepinguin@gmail.com (JIRA)

unread,
Jul 2, 2018, 8:15:02 AM7/2/18
to jenkinsc...@googlegroups.com

Problem still exists in Jenkins 2, e.g. 2.124.

We see it not at fixed widths, but at every space of the description string. _See below output, where the actual contents are shown with either xxd or od.

In xxd you see extra bytes 'e2 80 8b' and in od you see 'b nul vt' (342 200 213).

echo "(BR: ​5c12ee9f, ​SW: ​28d0325c, ​BLD: ​60.776) " |xxd
00000000: 2842 523a 20e2 808b 3563 3132 6565 3966 (BR: ...5c12ee9f
00000010: 2c20 e280 8b53 573a 20e2 808b 3238 6430 , ...SW: ...28d0
00000020: 3332 3563 2c20 e280 8b42 4c44 3a20 e280 325c, ...BLD: ..
00000030: 8b36 302e 3737 3629 200a .60.776) .

echo "(BR: ​5c12ee9f, ​SW: ​28d0325c, ​BLD: ​60.776) " |od -ac 
0000000   (   B   R   :  sp   b nul  vt   5   c   1   2   e   e   9   f
          (   B   R   :     342 200 213   5   c   1   2   e   e   9   f
0000020   ,  sp   b nul  vt   S   W   :  sp   b nul  vt   2   8   d   0
          ,     342 200 213   S   W   :     342 200 213   2   8   d   0
0000040   3   2   5   c   ,  sp   b nul  vt   B   L   D   :  sp   b nul
          3   2   5   c   ,     342 200 213   B   L   D   :     342 200
0000060  vt   6   0   .   7   7   6   )  sp  nl
        213   6   0   .   7   7   6   )      \n
0000072
Change By: Thomas De Schampheleire
Environment: Jenkins 1.596.1 , 2.124
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

patrickdepinguin@gmail.com (JIRA)

unread,
Jul 2, 2018, 8:28:03 AM7/2/18
to jenkinsc...@googlegroups.com
Thomas De Schampheleire commented on Bug JENKINS-28022
 
Re: Build description longer than 30 chars has hex zero width space added

Workaround suggested by Luke Street indeed works.

The JavaScript function insertZeroWidthSpacesInElementText is defined and called from war/src/main/webapp/scripts/hudson-behavior.js and indicates that this is actually a feature.

It was introduced by Tom FENNELLY in commit cb9036c4552 and refined in b31bb1cc1c5.

Tom FENNELLY, could you give input on this issue, please?

dbeck@cloudbees.com (JIRA)

unread,
Jul 2, 2018, 8:50:02 AM7/2/18
to jenkinsc...@googlegroups.com

I asked in https://github.com/jenkinsci/jenkins/pull/3377 that the author investigates whether a similar approach could be done for this. No response. Perhaps one of the watchers here feels up to the task?

woldemar@mimas.ru (JIRA)

unread,
Jul 24, 2019, 7:53:03 AM7/24/19
to jenkinsc...@googlegroups.com

We had just encountered same problem once we started using Build Name Setter Plugin.
Can confirm that workaround provided by Luke Street 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.

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

woldemar@mimas.ru (JIRA)

unread,
Jul 24, 2019, 8:14:02 AM7/24/19
to jenkinsc...@googlegroups.com
Vladimir Looze edited a comment on Bug JENKINS-28022
We had just encountered same problem once we started using [Build Name Setter Plugin|https://wiki.jenkins.io/display/JENKINS/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
{{ & \ #8203; }}​ in HTML.

alexej.ismailov@gmail.com (JIRA)

unread,
Oct 1, 2019, 3:22:02 AM10/1/19
to jenkinsc...@googlegroups.com

Hi, thank you for the suggested workarounds. Pardon my inexperience, do I need to have a custom theme to put Luke Street'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.

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

alexej.ismailov@gmail.com (JIRA)

unread,
Oct 1, 2019, 3:23:02 AM10/1/19
to jenkinsc...@googlegroups.com
Alexej Ismailov edited a comment on Bug JENKINS-28022
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.
Reply all
Reply to author
Forward
0 new messages