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

HTML in job & build description has important elements removed

      Dear Team,

      After upgrading Jenkins to the latest LTS version 2.263.1 the HTML put in job description, or build description is somehow processed server side and stuff is removed, like:

      1. "font" tags are removed completely
        • IMPACT:   lost all formatting (color, font size, font effects)
        • workarround is to set the font as a style  
          • source:           <li><font size="2" color="purple"> MESSAGE </font></li>
          • rendered:        <li> MESSAGE </li>
          • solution:          <li style="color:purple!important; font-size:20px"> MESSAGE </li>
      2. "title" attributes are removed from all tags
        • IMPACT:   no more tooltips on our tables
        • No workaround
          • source:         <td title="TOOLTIP"> MESSAGE </td>
          • rendered:      <td> MESSAGE </td>
      3. "rowspan" / "colspan" attributes are removed from "td" and "th" tags
        • IMPACT:   pre-existent tables are now misaligned 
        • No workaround
          • source:        <th rowspan="2" colspan="3">Build</th>
          • rendered:     <th>Build</th>

       

       

       

          [JENKINS-64507] HTML in job & build description has important elements removed

          Vlad Andone added a comment - - edited

          Same problem here.    All this was working back in 2.204.1 but fails in the newest LTS 2.263.1

          The HTML put in job description, or build description is somehow processed server side and stuff is removed, like:

          • "font" tags are removed completely
            • IMPACT:   lost all formatting (color, font size, font effects)
            • workarround is to set the font as a style  
              • original:           <li><font size="2" color="purple"> MESSAGE </font></li>
              • displayed:        <li> MESSAGE </li>
              • solution:          <li style="color:purple!important; font-size:20px"> MESSAGE </li>
          • "title" attributes are removed from all tags
            • IMPACT:   no more tooltips on our tables
            • No workaround
              • original:         <td title="TOOLTIP"> MESSAGE </td>
              • displayed:      <td> MESSAGE </td>
          • "rowspan" / "colspan" attributes are removed from "td" and "th" tags
            • IMPACT:   pre-existent tables are now misaligned 
            • No workaround
              • original:        <th rowspan="2" colspan="3">Build</th>
              • displayed:      <th>Build</th>**

          Vlad Andone added a comment - - edited Same problem here.    All this was working back in 2.204.1 but fails in the newest LTS 2.263.1 The HTML put in job description, or build description is somehow processed server side and stuff is removed, like: "font" tags are removed completely IMPACT:   lost all formatting (color, font size, font effects) workarround is to set the font as a style   original:           <li> <font size="2" color="purple"> MESSAGE </font> </li> displayed:        <li> MESSAGE </li> solution:          <li style="color:purple!important; font-size:20px"> MESSAGE </li> "title" attributes are removed from all tags IMPACT:   no more tooltips on our tables No workaround original:         <td title="TOOLTIP" > MESSAGE </td> displayed:      <td> MESSAGE </td> "rowspan" / "colspan" attributes are removed from "td" and "th" tags IMPACT:   pre-existent tables are now misaligned  No workaround original:        <th rowspan="2" colspan="3" >Build</th> displayed:      <th>Build</th>**

          Vlad Andone added a comment -

          @fqueiruga Could this bug be caused by changes corresponding to epic JENKINS-60919 ?

           

          Vlad Andone added a comment - @ fqueiruga  Could this bug be caused by changes corresponding to epic JENKINS-60919  ?  

          I'd need some more info. Can you provide some before screenshots? I'd also need to know what was your previous Jenkins version where this used to work.

          Félix Queiruga Balado added a comment - I'd need some more info. Can you provide some  before screenshots? I'd also need to know what was your previous Jenkins version where this used to work.

          Vlad Andone added a comment - - edited

          Sorry guys. Apparently the problem was caused by the "OWASP Markup Formatter" plugin v2.1

          Plugin gets overreactive and strips a lot from HTML in the process of sanitizing it.

          https://plugins.jenkins.io/antisamy-markup-formatter/

           

          @jglick:  downgrading to "OWASP Markup Formatter" 1.6 solves the problem for us

           

          Vlad Andone added a comment - - edited Sorry guys. Apparently the problem was caused by the "OWASP Markup Formatter" plugin v2.1 Plugin gets overreactive and strips a lot from HTML in the process of sanitizing it. https://plugins.jenkins.io/antisamy-markup-formatter/   @ jglick :  downgrading to "OWASP Markup Formatter" 1.6 solves the problem for us  

          Jesse Glick added a comment -

          Jesse Glick added a comment - As designed: https://github.com/jenkinsci/antisamy-markup-formatter-plugin/pull/12

            Unassigned Unassigned
            rajivece Rajiv Rajaian
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: