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

Build history text field wrap fails when containing markup

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            legolas Arnt Witteveen created issue -
            Hide
            danielbeck 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?

            Show
            danielbeck 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?
            Hide
            karisivo 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

            Show
            karisivo 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
            danielbeck Daniel Beck made changes -
            Field Original Value New Value
            Link This issue is duplicated by JENKINS-26539 [ JENKINS-26539 ]
            Hide
            tfennelly 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.

            Show
            tfennelly 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.
            tfennelly Tom FENNELLY made changes -
            Assignee Tom FENNELLY [ tfennelly ]
            Hide
            tfennelly 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.

            Show
            tfennelly 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.
            Hide
            danielbeck 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.

            Show
            danielbeck 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.
            Hide
            tfennelly Tom FENNELLY added a comment -

            Daniel, you're a star ! Thanks.

            Show
            tfennelly Tom FENNELLY added a comment - Daniel, you're a star ! Thanks.
            Hide
            tfennelly 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.

            Show
            tfennelly 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.
            Hide
            legolas 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?

            Show
            legolas 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?
            Hide
            danielbeck 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.

            Show
            danielbeck 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.
            legolas Arnt Witteveen made changes -
            Link This issue is related to JENKINS-26565 [ JENKINS-26565 ]
            legolas Arnt Witteveen made changes -
            Link This issue is related to JENKINS-26565 [ JENKINS-26565 ]
            Hide
            tfennelly Tom FENNELLY added a comment -

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

            Show
            tfennelly Tom FENNELLY added a comment - Thanks ... Jenkins core is currently using v1.1 of that plugin. That change was after v1.1.
            Hide
            legolas Arnt Witteveen added a comment -

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

            Show
            legolas Arnt Witteveen added a comment - If this matters: I am on version 1.3 of the OWASP Markup Formatter Plugin (aka antisamy-markup-formatter)
            Hide
            tfennelly Tom FENNELLY added a comment - - edited

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

            Show
            tfennelly Tom FENNELLY added a comment - - edited Thanks Arnt ... yes, I also updated to v 1.3.
            Hide
            tfennelly 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.

            Show
            tfennelly 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.
            Hide
            legolas 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"?

            Show
            legolas 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"?
            Hide
            tfennelly 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?

            Show
            tfennelly 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?
            Hide
            tfennelly Tom FENNELLY added a comment -

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

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

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

            Show
            tfennelly Tom FENNELLY added a comment - OK... sorry for all the noise ... I got it now !!!
            tfennelly Tom FENNELLY made changes -
            Summary description-setter plugin cannot set html anymore Build history text field wrap fails when containing markup
            Show
            tfennelly Tom FENNELLY added a comment - PR: https://github.com/jenkinsci/jenkins/pull/1542
            tfennelly Tom FENNELLY made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            danielbeck Daniel Beck made changes -
            Labels buildhistory user-experience buildhistory lts-candidate user-experience
            Hide
            danielbeck 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.

            Show
            danielbeck 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.
            Hide
            tfennelly 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.

            Show
            tfennelly 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 .
            Hide
            tfennelly 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.

            Show
            tfennelly 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 .
            Hide
            legolas Arnt Witteveen added a comment -

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

            Show
            legolas Arnt Witteveen added a comment - Unfortunately I have only 1 (production) Jenkins, so I don't really have a way to test this
            Hide
            danielbeck 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.

            Show
            danielbeck 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.
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            scm_issue_link SCM/JIRA link daemon made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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
            Hide
            dogfood 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
            Show
            dogfood 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
            Hide
            legolas 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)?

            Show
            legolas 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)?
            Hide
            danielbeck 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!)

            Show
            danielbeck 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!)
            olivergondza Oliver Gondža made changes -
            Labels buildhistory lts-candidate user-experience 1.596.2-fixed buildhistory user-experience
            olivergondza Oliver Gondža made changes -
            Labels 1.596.2-fixed buildhistory user-experience 1.596.3-fixed buildhistory user-experience
            Hide
            scm_issue_link 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)

            Show
            scm_issue_link 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)
            Hide
            dspartz 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

            Show
            dspartz 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
            danielbeck Daniel Beck made changes -
            Link This issue is duplicated by JENKINS-27824 [ JENKINS-27824 ]
            danielbeck Daniel Beck made changes -
            Link This issue is duplicated by JENKINS-28214 [ JENKINS-28214 ]
            Hide
            dogfood 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
            Show
            dogfood 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
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 160472 ] JNJira + In-Review [ 196448 ]

              People

              • Assignee:
                tfennelly Tom FENNELLY
                Reporter:
                legolas Arnt Witteveen
              • Votes:
                3 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: