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

invalid (duplicate) class in svg symbols

XMLWordPrintable

    • 2.383

      in the Jenkins HTML pages for a build (pipeline run) the HTML is invalid as it contains SVG entries with duplicate (and conflicting) class attributes

      e,g.

      <svg class="icon-up icon-md" class="" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" class="" viewBox="0 0 512 512">...

      note that it has declared the class attribute 3 times, twice as empty and once with icon-up icon-md

      https://ci.jenkins.io/job/Core/job/jenkins/job/master/3773/

      for example contains
      <a href="/job/Core/job/jenkins/job/master/" class="task-link "><span class="task-icon-link"><svg class="icon-up icon-md" class="" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" class="" viewBox="0 0 512 512"....

      Steps to reproduce

      create a Jenkins job (probably pipeline but freestyle may also work)
      create a build of the job
      open the build page
      view the source of the build page
      search for elements with duplicate class attributes

      expected results

      there are no elements with duplicate attribute definitions

      actual results

      there are elements with duplicate (and conflicting) definitions.

      Notes

      This is illegal HTML, behaviour is undefined, chrome seems to ignore the last attribute, other browsers and xpath for webdriver may produce other results/
      Probably occurred with the introduction of svg as icons or JENKINS-68630 Jenkins 2.303.3 is not impacted for the "back to dashboard" where it uses a PNG

      Update: you do not even need a build - this is reproducible with the "back to dashboard" of a folder / job.

            Unassigned Unassigned
            teilo James Nord
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: