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

Email notification source tries to indent HTML from console output

    XMLWordPrintable

Details

    Description

      We use the extended email notification plugin and its regex tokens to email a section of the console output. That section is a basic HTML with a few <pre> tags that are pre formatted. After the latest update of both the plugin and jenkins, the section of the console output started getting a "tidyhtml" treatment.

      Old email source and console output looked like this:
      <html>
      <head></head>
      <body>
      <table border="1">
      <tbody>
      <tr>
      <td> <b>TEXT</b> </td>
      <td> <b>TEXT</b><pre>
      line
      line<v1>line
      line<v1>line
      ...

      New email source looks like this (and messing up the actual email):
      <html>
      <head></head>
      <body>
      <table border="1">
      <tbody>
      <tr>
      <td> <b>TEXT</b> </td>
      <td> <b>TEXT</b><pre>
      line
      line
      <v1>
      line
      line
      <v1>
      line
      ...

      While I don't mind indentation and pretty printing, it seems like a bug to try to beautify (by introducing new lines and spaces) the output of a console.

      EDIT: alright, looks like jira clears any leading blanks so I'll use * to indicate space.
      New output:
      <html>
      *<head></head>
      **<body>
      ***<table border="1">
      ***<tbody>
      ****<tr>
      *****<td> <b>TEXT</b> </td>
      *****<td> <b>TEXT</b><pre>
      line
      line
      ******<v1>
      *******line
      line
      *******<v1>
      ********line

      Attachments

        Activity

          todorovge Georgi Todorov created issue -
          todorovge Georgi Todorov made changes -
          Field Original Value New Value
          Description We use the extended email notification plugin and its regex tokens to email a section of the console output. That section is a basic HTML with a few <pre> tags that are pre formatted. After the latest update of both the plugin and jenkins, the section of the console output started getting a "tidyhtml" treatment.

          Old email source and console output looked like this:
          <html>
          <head></head>
          <body>
          <table border="1">
          <tbody>
          <tr>
          <td> <b>TEXT</b> </td>
          <td> <b>TEXT</b><pre>
          line
          line<v1>line
          line<v1>line
          ...

          New email source looks like this (and messing up the actual email):
          <html>
           <head></head>
           <body>
            <table border="1">
             <tbody>
              <tr>
               <td> <b>TEXT</b> </td>
               <td> <b>TEXT</b><pre>
          line
          line
                <v1>
                line
          line
                  <v1>
                  line
          ...

          While I don't mind indentation and pretty printing, it seems like a bug to try to beautify (by introducing new lines and spaces) the output of a console.
          We use the extended email notification plugin and its regex tokens to email a section of the console output. That section is a basic HTML with a few <pre> tags that are pre formatted. After the latest update of both the plugin and jenkins, the section of the console output started getting a "tidyhtml" treatment.

          Old email source and console output looked like this:
          <html>
          <head></head>
          <body>
          <table border="1">
          <tbody>
          <tr>
          <td> <b>TEXT</b> </td>
          <td> <b>TEXT</b><pre>
          line
          line<v1>line
          line<v1>line
          ...

          New email source looks like this (and messing up the actual email):
          <html>
           <head></head>
           <body>
            <table border="1">
             <tbody>
              <tr>
               <td> <b>TEXT</b> </td>
               <td> <b>TEXT</b><pre>
          line
          line
                <v1>
                line
          line
                  <v1>
                  line
          ...

          While I don't mind indentation and pretty printing, it seems like a bug to try to beautify (by introducing new lines and spaces) the output of a console.

          EDIT: alright, looks like jira clears any leading blanks so I'll use * to indicate space.
          New output:
          <html>
          *<head></head>
          **<body>
          ***<table border="1">
          ***<tbody>
          ****<tr>
          *****<td> <b>TEXT</b> </td>
          *****<td> <b>TEXT</b><pre>
          line
          line
          ******<v1>
          ******line
          line
          *******<v1>
          *******line
          todorovge Georgi Todorov made changes -
          Description We use the extended email notification plugin and its regex tokens to email a section of the console output. That section is a basic HTML with a few <pre> tags that are pre formatted. After the latest update of both the plugin and jenkins, the section of the console output started getting a "tidyhtml" treatment.

          Old email source and console output looked like this:
          <html>
          <head></head>
          <body>
          <table border="1">
          <tbody>
          <tr>
          <td> <b>TEXT</b> </td>
          <td> <b>TEXT</b><pre>
          line
          line<v1>line
          line<v1>line
          ...

          New email source looks like this (and messing up the actual email):
          <html>
           <head></head>
           <body>
            <table border="1">
             <tbody>
              <tr>
               <td> <b>TEXT</b> </td>
               <td> <b>TEXT</b><pre>
          line
          line
                <v1>
                line
          line
                  <v1>
                  line
          ...

          While I don't mind indentation and pretty printing, it seems like a bug to try to beautify (by introducing new lines and spaces) the output of a console.

          EDIT: alright, looks like jira clears any leading blanks so I'll use * to indicate space.
          New output:
          <html>
          *<head></head>
          **<body>
          ***<table border="1">
          ***<tbody>
          ****<tr>
          *****<td> <b>TEXT</b> </td>
          *****<td> <b>TEXT</b><pre>
          line
          line
          ******<v1>
          ******line
          line
          *******<v1>
          *******line
          We use the extended email notification plugin and its regex tokens to email a section of the console output. That section is a basic HTML with a few <pre> tags that are pre formatted. After the latest update of both the plugin and jenkins, the section of the console output started getting a "tidyhtml" treatment.

          Old email source and console output looked like this:
          <html>
          <head></head>
          <body>
          <table border="1">
          <tbody>
          <tr>
          <td> <b>TEXT</b> </td>
          <td> <b>TEXT</b><pre>
          line
          line<v1>line
          line<v1>line
          ...

          New email source looks like this (and messing up the actual email):
          <html>
           <head></head>
           <body>
            <table border="1">
             <tbody>
              <tr>
               <td> <b>TEXT</b> </td>
               <td> <b>TEXT</b><pre>
          line
          line
                <v1>
                line
          line
                  <v1>
                  line
          ...

          While I don't mind indentation and pretty printing, it seems like a bug to try to beautify (by introducing new lines and spaces) the output of a console.

          EDIT: alright, looks like jira clears any leading blanks so I'll use * to indicate space.
          New output:
          <html>
          *<head></head>
          **<body>
          ***<table border="1">
          ***<tbody>
          ****<tr>
          *****<td> <b>TEXT</b> </td>
          *****<td> <b>TEXT</b><pre>
          line
          line
          ******<v1>
          *******line
          line
          *******<v1>
          ********line
          slide_o_mix Alex Earl added a comment -

          My guess is that this is from the cssinliner. I'll take a look

          slide_o_mix Alex Earl added a comment - My guess is that this is from the cssinliner. I'll take a look

          Code changed in jenkins
          User: Alex Earl
          Path:
          src/main/java/hudson/plugins/emailext/plugins/CssInliner.java
          src/test/java/hudson/plugins/emailext/plugins/CssInlinerTest.java
          http://jenkins-ci.org/commit/email-ext-plugin/fd016daf6695875f03320474848000201a4409c8
          Log:
          Fixed JENKINS-17759

          Turned off pretty printing in the CssInliner.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: src/main/java/hudson/plugins/emailext/plugins/CssInliner.java src/test/java/hudson/plugins/emailext/plugins/CssInlinerTest.java http://jenkins-ci.org/commit/email-ext-plugin/fd016daf6695875f03320474848000201a4409c8 Log: Fixed JENKINS-17759 Turned off pretty printing in the CssInliner.
          slide_o_mix Alex Earl added a comment -

          Turned off pretty printing in the css inliner (jsoup).

          slide_o_mix Alex Earl added a comment - Turned off pretty printing in the css inliner (jsoup).
          slide_o_mix Alex Earl made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]

          Thanks!

          todorovge Georgi Todorov added a comment - Thanks!
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 148939 ] JNJira + In-Review [ 192953 ]

          People

            slide_o_mix Alex Earl
            todorovge Georgi Todorov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: