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

groovy-html does not html encode lines from the build log

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • email-ext-plugin
    • None

      The groovy-html template does not correctly encode getLog() content as HTML in the email. For example, less than (<) and greater than (>) characters, which are used frequently in junit failure messages sometimes disappear in the email messages.

      If you look at https://github.com/jenkinsci/email-ext-plugin/blob/master/src/main/resources/hudson/plugins/emailext/templates/groovy-html.template

      You'll see

      <% build.getLog(100).each() { line -> %>
      <TR><TD class="console">${line}</TD></TR>
      <% } %>

      The $line needs to be HTML encoded.

      EDIT: I checked again and maybe this isn't an issue but an issue with a mac Mail client. Alex, can you check and mark as no repro if necessary? Thanks.

            slide_o_mix Alex Earl
            joshunger Josh Unger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: