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

Attribute like e.g. class gets lost from HTML code in description fields

      After upgrading the markup formatter plugin from 1.8 to 2.0 HTML code in system message, job description, build description and testresult description fields loses attributes like for example class attributes.

      We use these HTML descriptions a lot and also use the Simple Theme Plugin to style them. Without CSS classes this is not really possible.

          [JENKINS-61670] Attribute like e.g. class gets lost from HTML code in description fields

          Lars added a comment -

          Why was this issue changed from "bug" to "improvement"? It worked before and is broken now and there was no need to change it. So it's a bug.

          Lars added a comment - Why was this issue changed from "bug" to "improvement"? It worked before and is broken now and there was no need to change it. So it's a bug.

          Alexander Komarov added a comment - - edited

          Likewise affected. 

          Now, to style my job descriptions I need to use the Simple Theme plugin, but since I can't add class to a div anymore, I need to use selectors like 

            div#description>div>div:nth-child(2)

          to style them.  Or, I suppose, I can switch to using style="" since all my job descriptions are generated with Job DSL anyway.

          Alexander Komarov added a comment - - edited Likewise affected.  Now, to style my job descriptions I need to use the Simple Theme plugin, but since I can't add  class to a  div anymore, I need to use selectors like    div#description>div>div:nth-child(2) to style them.  Or, I suppose, I can switch to using  style="" since all my job descriptions are generated with Job DSL anyway.

          Guys any update on that issue?
          We have the same problem and I'm looking for workaround since we can not use CSS classes.

          Wojciech Beczala added a comment - Guys any update on that issue? We have the same problem and I'm looking for workaround since we can not use CSS classes.

          Lars added a comment -

          No reaction? Seriously?

          Lars added a comment - No reaction? Seriously?

          Lars added a comment -

          Still forced to use 1.8 because of these unnecessary restrictions

          Lars added a comment - Still forced to use 1.8 because of these unnecessary restrictions

          Mark Waite added a comment -

          See the comments in https://github.com/jenkinsci/antisamy-markup-formatter-plugin/pull/12#issue-461987547 that describe why the defaults were made more restrictive.

          Mark Waite added a comment - See the comments in https://github.com/jenkinsci/antisamy-markup-formatter-plugin/pull/12#issue-461987547 that describe why the defaults were made more restrictive.

          Lars added a comment -

          No, these comments do not describe why it was made THAT restrictive. While it might be reasonable to remove form elements (and even that is still something the user should be able to decide instead of saying "We know what's best for you"), it is NOT reasonable to remove attributes like class or title.

          Lars added a comment - No, these comments do not describe why it was made THAT restrictive. While it might be reasonable to remove form elements (and even that is still something the user should be able to decide instead of saying "We know what's best for you"), it is NOT reasonable to remove attributes like class or title.

          Bonthu added a comment -

          We too are facing lot of issues after upgrading from 1.8 to 159.v25b_c67cd35fb, all dropdowns which are using div id and class for chevron down are getting removed. We had requirement to upgrade this plugin inorder to fix vulnerable versions with other plugins. When this issue can be addressed? any help on this please.

          Bonthu added a comment - We too are facing lot of issues after upgrading from 1.8 to 159.v25b_c67cd35fb, all dropdowns which are using div id and class for chevron down are getting removed. We had requirement to upgrade this plugin inorder to fix vulnerable versions with other plugins. When this issue can be addressed? any help on this please.

          Mark Waite added a comment -

          sirishabonthu as far as I can tell, there is no intention to change from the current behavior of the plugin.

          Mark Waite added a comment - sirishabonthu as far as I can tell, there is no intention to change from the current behavior of the plugin.

          Bonthu added a comment -

          markewaite  Div id and class attributes are getting removed and the dropdowns in the description are no longer working when upgraded OWASP MarkUp formatter from 1.8 to 159.v25b_c67cd35fb. We tried upgrading jenkins version to 2.387.3 which supports Customizable HTML Formatter Plugin, and defined policy to allow the div id and class attributes. Now the dropdowns are working as before.

          Bonthu added a comment - markewaite   Div id and class attributes are getting removed and the dropdowns in the description are no longer working when upgraded OWASP MarkUp formatter from 1.8 to 159.v25b_c67cd35fb. We tried upgrading jenkins version to 2.387.3 which supports Customizable HTML Formatter Plugin, and defined policy to allow the div id and class attributes. Now the dropdowns are working as before.

            Unassigned Unassigned
            wolterhis Lars
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: