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 created issue -
          Daniel Beck made changes -
          Issue Type Original: Bug [ 1 ] New: Improvement [ 4 ]

          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 made changes -
          Issue Type Original: Improvement [ 4 ] New: Bug [ 1 ]

          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.

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

              Created:
              Updated: