• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None
    • 2.459

      Assume you have following svg

      <svg ...>
      <defs>
        <style>
          .cls1 {fill:#1a1a1a}
        </style>
        <path class="cls1" d="..."/>
      </defs>

      The result is that the style is not applied to the path because the class attribute of the path element is removed. The reason is unconditional removing of all class="" attributes in the svg by this line in the Symbol class

      .replaceAll("(class=\").*?(\")", "")

      I assume the intention was to remove the class attribute of the svg element and not all class attributes.

          [JENKINS-73156] loadsymbol removes all class attributes

          Markus Winter added a comment -

          Another problem is the attempt to replace the color black with currentColor. This is done via

           .replace("stroke:#000", "stroke:currentColor")

          unfortunately this also matches 

          stroke:#000105
          

          leading to broken images

          Markus Winter added a comment - Another problem is the attempt to replace the color black with currentColor. This is done via .replace( "stroke:#000" , "stroke:currentColor" ) unfortunately this also matches  stroke:#000105 leading to broken images

            mawinter69 Markus Winter
            mawinter69 Markus Winter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: