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

HTML test output in tapResults not escaped

    Details

    • Similar Issues:

      Description

      On tapResults page, if the output of a given test contains HTML, it renders it out onto the tapResults report wholesale and unescaped.

      If the HTML is partial, it can lead to some output being outside of a result table or missing on render entirely.

      To illustrate what I mean, I've included some offending TAP file content and some screenshots of the results(masking applied by me to protect some data).

      #     <div id="PageWrapper">
      # 
      #       <div id="Header">
      #         <div class="Liner">
      # </div><!-- end Liner -->
      #       </div><!-- end Header -->
      #       <div id="ContentWrapper">
      #         <div id="ContentColumn">
      #           <div class="Liner">
      # 
      # 
      # </div><!-- end Liner -->
      #         </div><!-- end ContentColumn -->
      #       </div><!-- end ContentWrapper -->
      # 
      #       <div id="NavColumn">
      #         <div class="Liner">
      # </div><!-- end Liner -->
      #       </div><!-- end NavColumn -->
      # 
      

        Attachments

          Activity

          real Real ONeil created issue -
          real Real ONeil made changes -
          Field Original Value New Value
          Description On tapResults page, if the output of a given test contains HTML, it renders it out onto the tapResults report wholesale and unescaped.

          If the HTML is partial, it can lead to some output being outside of a result table or missing on render entirely.

          To illustrate what I mean, I've included some offending TAP file content and some screenshots of the results(masking applied by me to protect some data).

          {code}
          # <div id="PageWrapper">
          #
          # <div id="Header">
          # <div class="Liner">
          # </div><!-- end Liner -->
          # </div><!-- end Header -->
          # <div id="ContentWrapper">
          # <div id="ContentColumn">
          # <div class="Liner">
          #
          #
          # </div><!-- end Liner -->
          # </div><!-- end ContentColumn -->
          # </div><!-- end ContentWrapper -->
          #
          # <div id="NavColumn">
          # <div class="Liner">
          # </div><!-- end Liner -->
          # </div><!-- end NavColumn -->
          #
          {/code}
          On tapResults page, if the output of a given test contains HTML, it renders it out onto the tapResults report wholesale and unescaped.

          If the HTML is partial, it can lead to some output being outside of a result table or missing on render entirely.

          To illustrate what I mean, I've included some offending TAP file content and some screenshots of the results(masking applied by me to protect some data).

          {code}
          # <div id="PageWrapper">
          #
          # <div id="Header">
          # <div class="Liner">
          # </div><!-- end Liner -->
          # </div><!-- end Header -->
          # <div id="ContentWrapper">
          # <div id="ContentColumn">
          # <div class="Liner">
          #
          #
          # </div><!-- end Liner -->
          # </div><!-- end ContentColumn -->
          # </div><!-- end ContentWrapper -->
          #
          # <div id="NavColumn">
          # <div class="Liner">
          # </div><!-- end Liner -->
          # </div><!-- end NavColumn -->
          #
          {code}
          Hide
          kinow Bruno P. Kinoshita added a comment -

          Thanks for reporting and including the HTML snippet and screenshots Real. I'll take a look on it as soon as I find time to work on tap-plugin again.

          Show
          kinow Bruno P. Kinoshita added a comment - Thanks for reporting and including the HTML snippet and screenshots Real. I'll take a look on it as soon as I find time to work on tap-plugin again.
          kinow Bruno P. Kinoshita made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          kinow Bruno P. Kinoshita made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          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/TapParser.java
          src/main/java/org/tap4j/plugin/TapResult.java
          src/main/resources/org/tap4j/plugin/tags/line.jelly
          http://jenkins-ci.org/commit/tap-plugin/279e1204335f2092f6beeababf174068223b6047
          Log:
          JENKINS-17878 Escape HTML in test results comments

          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/TapParser.java src/main/java/org/tap4j/plugin/TapResult.java src/main/resources/org/tap4j/plugin/tags/line.jelly http://jenkins-ci.org/commit/tap-plugin/279e1204335f2092f6beeababf174068223b6047 Log: JENKINS-17878 Escape HTML in test results comments
          Hide
          kinow Bruno P. Kinoshita added a comment -

          To be released tonight, probably tomorrow by noon it will be available in 1.12 via update site. Thanks!

          Show
          kinow Bruno P. Kinoshita added a comment - To be released tonight, probably tomorrow by noon it will be available in 1.12 via update site. Thanks!
          kinow Bruno P. Kinoshita made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          kinow Bruno P. Kinoshita added a comment -

          Fixed in 1.12

          Show
          kinow Bruno P. Kinoshita added a comment - Fixed in 1.12
          kinow Bruno P. Kinoshita made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 149174 ] JNJira + In-Review [ 206633 ]

            People

            • Assignee:
              kinow Bruno P. Kinoshita
              Reporter:
              real Real ONeil
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: