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

un-escaped HTML when displaying TAP results

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When displaying parsed tap results (URLs like
      /jenkins/job/JOB_NAME/BUILD_NUMBER/tapResults/?) the extra YAML properties are not HTML escaped, which can causes display issues.

      For example, my TAP file looks like:

      ok 1
         ---
         actual: (#<ECHECK-DATA {10038520F3}>)
         ...
      0..1
      

      This is valid per the InstantTAP

      The angle brackets in TAP are displayed directly into HTML, and the test message is not displayed. In my browser that gets rendered to HTML as

      <td style="width: auto;">actual</td><td>(#<ECHECK-DATA {10038520F3}>)</td>
      

      I would like it rendered as:

      <td style="width: auto;">actual</td><td>(#&lt;ECHECK-DATA {10038520F3}&gt;)</td>
      

        Attachments

          Activity

          Hide
          ryepup Ryan Davis added a comment -

          Pretty sure it's this line that needs the HTML encode: DiagnosticUtil.java L91

          stackoverflow thread about HTML escaping

          Show
          ryepup Ryan Davis added a comment - Pretty sure it's this line that needs the HTML encode: DiagnosticUtil.java L91 stackoverflow thread about HTML escaping
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Bruno P. Kinoshita
          Path:
          src/main/java/org/tap4j/plugin/TapResult.java
          src/main/java/org/tap4j/plugin/util/DiagnosticUtil.java
          http://jenkins-ci.org/commit/tap-plugin/52a7986dafe41d458a2aae500e517928aebfd310
          Log:
          [FIXED JENKINS-14910] Escape HTML characters in YAML diagnostics

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Bruno P. Kinoshita Path: src/main/java/org/tap4j/plugin/TapResult.java src/main/java/org/tap4j/plugin/util/DiagnosticUtil.java http://jenkins-ci.org/commit/tap-plugin/52a7986dafe41d458a2aae500e517928aebfd310 Log: [FIXED JENKINS-14910] Escape HTML characters in YAML diagnostics
          Hide
          kinow Bruno P. Kinoshita added a comment -

          Fixed in 1.5

          Show
          kinow Bruno P. Kinoshita added a comment - Fixed in 1.5
          Hide
          ryepup Ryan Davis added a comment -

          Thanks!

          Show
          ryepup Ryan Davis added a comment - Thanks!

            People

            • Assignee:
              kinow Bruno P. Kinoshita
              Reporter:
              ryepup Ryan Davis
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: