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

Build Descriptions containing <br> are no longer rendered correctly on project page (but are renedered correctly on build page)

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • Jenkins 1.596.1, description-setter 1.9

      We make extensive use of multi-line build descriptions.
      E.g. inside one of our projects, we might have something like:
      echo "BUILD DESCRIPTION IS Branch: $GIT_BRANCH<br>$FOOBAR_DESCRIBE<br>PRODUCTION: $PRODUCTION"

      Then, in the Set Build description area, for Regular expression we have:
      BUILD DESCRIPTION IS (.*)

      On the Build page for any individual build, this will correctly be rendered as, for example:

      Branch: refs/remotes/origin/grunt-copy-production
      v3.3.1-20-g7494bddb
      PRODUCTION: true

      But on the Project Page, where the builds are listed, the <br> are no longer rendered. See attached screen shots.

      This is true of the new (black) Jenkins UI. In the old (blue) Jenkins UI, the <br> would cause the multi-line description to be rendered on multiple lines.

          [JENKINS-27824] Build Descriptions containing <br> are no longer rendered correctly on project page (but are renedered correctly on build page)

          M Chon added a comment -

          M Chon added a comment - Others may be affected: http://jenkins-ci.361315.n4.nabble.com/setting-multi-line-build-desc-using-Set-build-description-plugin-td3927685.html

          Daniel Beck added a comment -

          Is this specific to Description Setter Plugin, or does it affect manually set build descriptions as well?

          What markup formatter is selected in the global security options?

          Daniel Beck added a comment - Is this specific to Description Setter Plugin, or does it affect manually set build descriptions as well? What markup formatter is selected in the global security options?

          M Chon added a comment - - edited

          In Global Security, we are using 'Safe HTML'.
          Prior to the 1.596.1 Jenkins upgrade, all of our servers were set to use 'Raw HTML'- which no longer seems to be an option in the dropdown list.

          On a test project, I manually edited the description to change it from a single line to this:
          d9489496<br>line2<br>line3<br>line4

          Then I saved the project, and navigated back to the main project page to look at the list of builds. Interestingly, I am almost 100% sure I briefly saw it being rendered in multiple lines, but then it redrew (??) itself and now looks like the attached screen shot. (multi-line-rendered-as-single-line-Safe-HTML)

          M Chon added a comment - - edited In Global Security, we are using 'Safe HTML'. Prior to the 1.596.1 Jenkins upgrade, all of our servers were set to use 'Raw HTML'- which no longer seems to be an option in the dropdown list. On a test project, I manually edited the description to change it from a single line to this: d9489496<br>line2<br>line3<br>line4 Then I saved the project, and navigated back to the main project page to look at the list of builds. Interestingly, I am almost 100% sure I briefly saw it being rendered in multiple lines, but then it redrew (??) itself and now looks like the attached screen shot. (multi-line-rendered-as-single-line-Safe-HTML)

          M Chon added a comment -

          In my browser, I mouse over both areas and do 'Inspect Element'.
          It clearly shows that the <br> are retained on the build page, but removed in the Build History area.

          Build History:
          <div class="pane desc indent-multiline zws-inserted">d9489496line2line3line4 </div>

          Build Page:
          <div>d9489496<br>line2<br>line3<br>line4</div>

          M Chon added a comment - In my browser, I mouse over both areas and do 'Inspect Element'. It clearly shows that the <br> are retained on the build page, but removed in the Build History area. Build History: <div class="pane desc indent-multiline zws-inserted">d9489496line2line3line4 </div> Build Page: <div>d9489496<br>line2<br>line3<br>line4</div>

          M Chon added a comment - - edited

          Correct rendering (on the build page):

          <div id="description"><div>d9489496<br>line2<br>line3<br>line4</div><div align="right"><a id="description-link" onclick="return replaceDescription();" href="editDescription"><img style="width: 16px; height: 16px; " class="icon-notepad icon-sm" src="/static/1d44e713/images/16x16/notepad.png">edit description</a></div></div>

          M Chon added a comment - - edited Correct rendering (on the build page): <div id="description"><div>d9489496<br>line2<br>line3<br>line4</div><div align="right"><a id="description-link" onclick="return replaceDescription();" href="editDescription"><img style="width: 16px; height: 16px; " class="icon-notepad icon-sm" src="/static/1d44e713/images/16x16/notepad.png">edit description</a></div></div>

          M Chon added a comment -

          Incorrect rendering (in the Build History area):

          <tr class="build-row multi-line overflow-checked"><td class="build-row-cell"><div class="pane build-name" style="height: 20px;"><div class="build-icon"><a class="build-status-link" href="/view/_foobar/job/foobar_test_branch/162/console"><img style="width: 16px; height: 16px; " alt="Success > Console Output" class="icon-blue icon-sm" src="/static/1d44e713/images/16x16/blue.png" tooltip="Success > Console Output" title="Success > Console Output"></a></div><a update-parent-class=".build-row" class="tip model-link inside build-link display-name zws-inserted" href="/view/_foobar/job/foobar_test_branch/162/">#1?62 </a></div><div time="1428504544000" class="pane build-details" style="height: 20px;"><a update-parent-class=".build-row" class="tip model-link inside build-link" href="/view/_foobar/job/foobar_test_branch/162/">Apr 8, 2015 7:49 AM</a></div><div class="pane build-controls"><div class="middle-align build-badge" style="width: 100%;"> <img title="Started by GitHub push by jdoe1" height="16" alt="Trigger GitHubPushCause : Started by GitHub push by jdoe1" width="16" src="/plugin/buildtriggerbadge/images/github-push-cause.png"></div></div><div class="pane desc indent-multiline zws-inserted">d9489496line2line3line4 </div><div class="left-bar"></div></td></tr>

          M Chon added a comment - Incorrect rendering (in the Build History area): <tr class="build-row multi-line overflow-checked"><td class="build-row-cell"><div class="pane build-name" style="height: 20px;"><div class="build-icon"><a class="build-status-link" href="/view/_foobar/job/foobar_test_branch/162/console"><img style="width: 16px; height: 16px; " alt="Success > Console Output" class="icon-blue icon-sm" src="/static/1d44e713/images/16x16/blue.png" tooltip="Success > Console Output" title="Success > Console Output"></a></div><a update-parent-class=".build-row" class="tip model-link inside build-link display-name zws-inserted" href="/view/_foobar/job/foobar_test_branch/162/">#1?62 </a></div><div time="1428504544000" class="pane build-details" style="height: 20px;"><a update-parent-class=".build-row" class="tip model-link inside build-link" href="/view/_foobar/job/foobar_test_branch/162/">Apr 8, 2015 7:49 AM</a></div><div class="pane build-controls"><div class="middle-align build-badge" style="width: 100%;"> <img title="Started by GitHub push by jdoe1" height="16" alt="Trigger GitHubPushCause : Started by GitHub push by jdoe1" width="16" src="/plugin/buildtriggerbadge/images/github-push-cause.png"></div></div><div class="pane desc indent-multiline zws-inserted">d9489496line2line3line4 </div><div class="left-bar"></div></td></tr>

          Daniel Beck added a comment -

          Duplicates JENKINS-26406.

          Daniel Beck added a comment - Duplicates JENKINS-26406 .

            huybrechts huybrechts
            mcsf M Chon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: