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

Build history text field wrap fails when containing markup

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • Jenkins 1.596 with description-setter plugin 1.9 (and other plugins, including build-name-setter )

      Upgrading from 1.578 to 1.596, I find that all the links I have in the build descriptions don't work in the build history (they do work on the build's main page).

      I use the description-setter to set discriptions like:
      <a href="${JOB_URL}../compiler=vc12/${BUILD_NUMBER}/console">win console</a>
      to link directly to the console form each job. (And 3 more links, to the build results and then the same for the mac build of this Multi-configuration project). These links still show as links on job/myjob/xx/ but only the text shows in the build history 'sidebar'. I add these links mostly for use from the sidebar (to save clicks and page load time when going to the console and build artefacts for a specific build).

      Looking through the Jenkins Changelog, I'm guessing this may be the result of the change in 1.593 (or maybe issue 16184?). The plugin itself did not change. I'm not sure if this change was intentional or not, at least nothing in the changelog seems to indicate it was.

          [JENKINS-26406] Build history text field wrap fails when containing markup

          Daniel Beck added a comment -

          JENKINS-16184 is unrelated.

          The 1.593 change may be related.

          Could you please confirm that you have a HTML markup formatter selected in Manage Jenkins / Configure Global Security?

          Daniel Beck added a comment - JENKINS-16184 is unrelated. The 1.593 change may be related. Could you please confirm that you have a HTML markup formatter selected in Manage Jenkins / Configure Global Security?

          Kari Sivonen added a comment -

          I have a same problem. I checked that Safe HTML is selected in HTML markup formatter. And in job build page HTML format is shown correct.

          I have also 1.596 version, but I think this change is related to 1.593 changes and issue JENKINS-25381

          Kari Sivonen added a comment - I have a same problem. I checked that Safe HTML is selected in HTML markup formatter. And in job build page HTML format is shown correct. I have also 1.596 version, but I think this change is related to 1.593 changes and issue JENKINS-25381

          Tom FENNELLY added a comment -

          I'd say what's happening here is that the code I added tries to insert invisible line-break characters into the cell text, which screws up markup. Sorry about that guys. I'll try get a fix ASAP.

          Tom FENNELLY added a comment - I'd say what's happening here is that the code I added tries to insert invisible line-break characters into the cell text, which screws up markup. Sorry about that guys. I'll try get a fix ASAP.

          Tom FENNELLY added a comment -

          Guys, can someone give me an explanation of how best to set this up please? I installed the Description Setter plugin (https://wiki.jenkins-ci.org/display/JENKINS/Description+Setter+Plugin). I read the instructions for using it but they're a head wrecker so maybe if someone could just tell me the steps to reproduce this in some way i.e. what values to put in what fields and where.

          Tom FENNELLY added a comment - Guys, can someone give me an explanation of how best to set this up please? I installed the Description Setter plugin ( https://wiki.jenkins-ci.org/display/JENKINS/Description+Setter+Plugin ). I read the instructions for using it but they're a head wrecker so maybe if someone could just tell me the steps to reproduce this in some way i.e. what values to put in what fields and where.

          Daniel Beck added a comment -

          Tom: As geekdave and me wrote in the original PR, it's sufficient to set up Jenkins to use the Safe HTML markup formatter, and enter an HTML build description.

          Daniel Beck added a comment - Tom: As geekdave and me wrote in the original PR , it's sufficient to set up Jenkins to use the Safe HTML markup formatter, and enter an HTML build description.

          Tom FENNELLY added a comment -

          Daniel, you're a star ! Thanks.

          Tom FENNELLY added a comment - Daniel, you're a star ! Thanks.

          Tom FENNELLY added a comment -

          I don't have a "Safe HTML" option in my formatters (security is enabled etc). I installed the anything goes formatter too but it doesn't seem to make a difference in terms of the build description - html tags are always being removed for e.g. https://www.dropbox.com/s/saf8bvg054ee8y1/Screenshot%202015-01-23%2007.52.17.png?dl=0 appears as regular text in the page i.e. view source, tags are removed.

          Tom FENNELLY added a comment - I don't have a "Safe HTML" option in my formatters (security is enabled etc). I installed the anything goes formatter too but it doesn't seem to make a difference in terms of the build description - html tags are always being removed for e.g. https://www.dropbox.com/s/saf8bvg054ee8y1/Screenshot%202015-01-23%2007.52.17.png?dl=0 appears as regular text in the page i.e. view source, tags are removed.

          Sorry, I only had time to look at this now. The markup formatter set in the Global Security Configuration is 'Safe HTML'. I can't remember changing that, I guess this is the default?

          Arnt Witteveen added a comment - Sorry, I only had time to look at this now. The markup formatter set in the Global Security Configuration is 'Safe HTML'. I can't remember changing that, I guess this is the default?

          Daniel Beck added a comment -

          Tom: 'Raw HTML' is old for 'Safe HTML', see:

          https://github.com/jenkinsci/antisamy-markup-formatter-plugin/commit/c21daf9debe89aa45314ede7cf25f6f734ab3002

          Both allow some HTML subset. Try b, i, and similar basic formatting, these are all allowed. a/href works as well.

          Daniel Beck added a comment - Tom: 'Raw HTML' is old for 'Safe HTML', see: https://github.com/jenkinsci/antisamy-markup-formatter-plugin/commit/c21daf9debe89aa45314ede7cf25f6f734ab3002 Both allow some HTML subset. Try b, i, and similar basic formatting, these are all allowed. a/href works as well.

          Tom FENNELLY added a comment -

          Thanks ... Jenkins core is currently using v1.1 of that plugin. That change was after v1.1.

          Tom FENNELLY added a comment - Thanks ... Jenkins core is currently using v1.1 of that plugin. That change was after v1.1.

          If this matters: I am on version 1.3 of the OWASP Markup Formatter Plugin (aka antisamy-markup-formatter)

          Arnt Witteveen added a comment - If this matters: I am on version 1.3 of the OWASP Markup Formatter Plugin (aka antisamy-markup-formatter)

          Tom FENNELLY added a comment - - edited

          Thanks Arnt ... yes, I also updated to v 1.3.

          Tom FENNELLY added a comment - - edited Thanks Arnt ... yes, I also updated to v 1.3.

          Tom FENNELLY added a comment -

          ok... I configured to use the Safe html formatter and then configured a build by added an a/href in the description. I don't see the error highlighted here but I also don't see the hyperlink - the anchor element is removed. There's obviously something else missing from my setup.

          Tom FENNELLY added a comment - ok... I configured to use the Safe html formatter and then configured a build by added an a/href in the description. I don't see the error highlighted here but I also don't see the hyperlink - the anchor element is removed. There's obviously something else missing from my setup.

          Hey Tom, what do you mean that you don't see the error highlighted here? The fact that you don't see a hyperlink in the build history 'sidebar' was the issue I was trying to describe, unless I'm misunderstanding what you mean by "but I also don't see the hyperlink"?

          Arnt Witteveen added a comment - Hey Tom, what do you mean that you don't see the error highlighted here? The fact that you don't see a hyperlink in the build history 'sidebar' was the issue I was trying to describe, unless I'm misunderstanding what you mean by "but I also don't see the hyperlink"?

          Tom FENNELLY added a comment -

          Thanks Arnt. Well then there seems to be multiple issues ... after looking at https://github.com/jenkinsci/jenkins/pull/1470#issuecomment-67550739 I was expecting to see the actual markup in the description. Maybe I need to configure a different formatter for that?

          Tom FENNELLY added a comment - Thanks Arnt. Well then there seems to be multiple issues ... after looking at https://github.com/jenkinsci/jenkins/pull/1470#issuecomment-67550739 I was expecting to see the actual markup in the description. Maybe I need to configure a different formatter for that?

          Tom FENNELLY added a comment -

          OK... seems like https://github.com/jenkinsci/jenkins/pull/1470#issuecomment-67550739 is referring to the "Escaped Formatter".

          Tom FENNELLY added a comment - OK... seems like https://github.com/jenkinsci/jenkins/pull/1470#issuecomment-67550739 is referring to the "Escaped Formatter".

          Tom FENNELLY added a comment -

          OK... sorry for all the noise ... I got it now !!!

          Tom FENNELLY added a comment - OK... sorry for all the noise ... I got it now !!!

          Tom FENNELLY added a comment -

          Tom FENNELLY added a comment - PR: https://github.com/jenkinsci/jenkins/pull/1542

          Daniel Beck added a comment -

          Assuming next LTS will not yet be 1.597 or higher due to build ID change, this is LTS-worthy.

          Daniel Beck added a comment - Assuming next LTS will not yet be 1.597 or higher due to build ID change, this is LTS-worthy.

          Tom FENNELLY added a comment - - edited

          Guys, can someone give this a sanity check please and let me know. There's a link to the jenkins.war in the PR.

          Tom FENNELLY added a comment - - edited Guys, can someone give this a sanity check please and let me know. There's a link to the jenkins.war in the PR .

          Tom FENNELLY added a comment -

          @Arnt @Daniel The fix for this issue is still not pushed upstream. I was hoping someone could do a sanity check on it. A link to the jenkins.war can be found in the PR.

          Tom FENNELLY added a comment - @Arnt @Daniel The fix for this issue is still not pushed upstream. I was hoping someone could do a sanity check on it. A link to the jenkins.war can be found in the PR .

          Unfortunately I have only 1 (production) Jenkins, so I don't really have a way to test this

          Arnt Witteveen added a comment - Unfortunately I have only 1 (production) Jenkins, so I don't really have a way to test this

          Daniel Beck added a comment -

          Arnt: Lame excuse. This is easy enough to test on a test instance. Download, java -jar jenkins.war and in two minutes you know whether it works.

          Daniel Beck added a comment - Arnt: Lame excuse. This is easy enough to test on a test instance. Download, java -jar jenkins.war and in two minutes you know whether it works.

          Code changed in jenkins
          User: tfennelly
          Path:
          war/src/main/webapp/css/style.css
          war/src/main/webapp/scripts/hudson-behavior.js
          http://jenkins-ci.org/commit/jenkins/b31bb1cc1c5a61a3e984e45e33cafa6130517938
          Log:
          [FIXED JENKINS-26406] Build history text field wrap fails when containing markup

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: tfennelly Path: war/src/main/webapp/css/style.css war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/b31bb1cc1c5a61a3e984e45e33cafa6130517938 Log: [FIXED JENKINS-26406] Build history text field wrap fails when containing markup

          Code changed in jenkins
          User: Tom Fennelly
          Path:
          war/src/main/webapp/css/style.css
          war/src/main/webapp/scripts/hudson-behavior.js
          http://jenkins-ci.org/commit/jenkins/a7a48abea71317a5a71335428e44e4db701cdb82
          Log:
          Merge pull request #1542 from tfennelly/JENKINS-26406

          [FIXED JENKINS-26406] Build history text field wrap fails when containing markup

          Compare: https://github.com/jenkinsci/jenkins/compare/a944634e4f2f...a7a48abea713

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Tom Fennelly Path: war/src/main/webapp/css/style.css war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/a7a48abea71317a5a71335428e44e4db701cdb82 Log: Merge pull request #1542 from tfennelly/ JENKINS-26406 [FIXED JENKINS-26406] Build history text field wrap fails when containing markup Compare: https://github.com/jenkinsci/jenkins/compare/a944634e4f2f...a7a48abea713

          Code changed in jenkins
          User: tfennelly
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/c78d1519a12bc6e6dfd393926402f5083ddba0c2
          Log:
          Noting JENKINS-26406

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: tfennelly Path: changelog.html http://jenkins-ci.org/commit/jenkins/c78d1519a12bc6e6dfd393926402f5083ddba0c2 Log: Noting JENKINS-26406

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3967
          [FIXED JENKINS-26406] Build history text field wrap fails when containing markup (Revision b31bb1cc1c5a61a3e984e45e33cafa6130517938)

          Result = SUCCESS
          tom.fennelly : b31bb1cc1c5a61a3e984e45e33cafa6130517938
          Files :

          • war/src/main/webapp/css/style.css
          • war/src/main/webapp/scripts/hudson-behavior.js

          dogfood added a comment - Integrated in jenkins_main_trunk #3967 [FIXED JENKINS-26406] Build history text field wrap fails when containing markup (Revision b31bb1cc1c5a61a3e984e45e33cafa6130517938) Result = SUCCESS tom.fennelly : b31bb1cc1c5a61a3e984e45e33cafa6130517938 Files : war/src/main/webapp/css/style.css war/src/main/webapp/scripts/hudson-behavior.js

          Hmm, you're right Daniel, I could only think of testing this with real data, but that's not really needed here of course. I see this was pushed to the main_trunk by now, does this mean it will be in the next release (I'll just test it by upgrading then)?

          Arnt Witteveen added a comment - Hmm, you're right Daniel, I could only think of testing this with real data, but that's not really needed here of course. I see this was pushed to the main_trunk by now, does this mean it will be in the next release (I'll just test it by upgrading then)?

          Daniel Beck added a comment -

          It'll be in 1.600. (The delayed release due to the RC process means turnaround time on everything feels like forever, so it's more important to test early!)

          Daniel Beck added a comment - It'll be in 1.600. (The delayed release due to the RC process means turnaround time on everything feels like forever, so it's more important to test early!)

          Code changed in jenkins
          User: tfennelly
          Path:
          war/src/main/webapp/css/style.css
          war/src/main/webapp/scripts/hudson-behavior.js
          http://jenkins-ci.org/commit/jenkins/446f3cae9f1e660ae48e989a561b7d1ddb722127
          Log:
          [FIXED JENKINS-26406] Build history text field wrap fails when containing markup

          (cherry picked from commit b31bb1cc1c5a61a3e984e45e33cafa6130517938)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: tfennelly Path: war/src/main/webapp/css/style.css war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/446f3cae9f1e660ae48e989a561b7d1ddb722127 Log: [FIXED JENKINS-26406] Build history text field wrap fails when containing markup (cherry picked from commit b31bb1cc1c5a61a3e984e45e33cafa6130517938)

          Daryl Spartz added a comment -

          The patch fixed a problem we discovered with html hyperlink in build description not being clickable. Please add to next LTS

          Daryl Spartz added a comment - The patch fixed a problem we discovered with html hyperlink in build description not being clickable. Please add to next LTS

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4292
          [FIXED JENKINS-26406] Build history text field wrap fails when containing markup (Revision 446f3cae9f1e660ae48e989a561b7d1ddb722127)

          Result = UNSTABLE
          ogondza : 446f3cae9f1e660ae48e989a561b7d1ddb722127
          Files :

          • war/src/main/webapp/css/style.css
          • war/src/main/webapp/scripts/hudson-behavior.js

          dogfood added a comment - Integrated in jenkins_main_trunk #4292 [FIXED JENKINS-26406] Build history text field wrap fails when containing markup (Revision 446f3cae9f1e660ae48e989a561b7d1ddb722127) Result = UNSTABLE ogondza : 446f3cae9f1e660ae48e989a561b7d1ddb722127 Files : war/src/main/webapp/css/style.css war/src/main/webapp/scripts/hudson-behavior.js

            tfennelly Tom FENNELLY
            legolas Arnt Witteveen
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: