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

HTML in job & build description has important elements removed

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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>

       

       

       

        Attachments

          Activity

          Hide
          andovlad 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>**
          Show
          andovlad 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>**
          Hide
          andovlad Vlad Andone added a comment -

          @Félix Queiruga Balado Could this bug be caused by changes corresponding to epic JENKINS-60919 ?

           

          Show
          andovlad Vlad Andone added a comment - @ Félix Queiruga Balado  Could this bug be caused by changes corresponding to epic JENKINS-60919  ?  
          Hide
          fqueiruga 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.

          Show
          fqueiruga 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.
          Hide
          andovlad 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/

           

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

           

          Show
          andovlad 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/   @ Jesse Glick :  downgrading to "OWASP Markup Formatter" 1.6 solves the problem for us  
          Show
          jglick Jesse Glick added a comment - As designed: https://github.com/jenkinsci/antisamy-markup-formatter-plugin/pull/12

            People

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

              Dates

              Created:
              Updated:
              Resolved: