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

[htmlpublisher] Extract inline script block and event handler in htmlpublisher/HtmlPublisher/header.html

XMLWordPrintable

    • 1.37

      Problems

      == Inline Script Block
      Line: 90
      ----
      <script type="text/javascript">
      function updateBody(tabId, page) {
          document.getElementById(selectedTab).setAttribute("class", "unselected");
          tab = document.getElementById(tabId)
          tab.setAttribute("class", "selected");
          selectedTab = tabId;
          iframe = document.getElementById("myframe");
          iframe.src = encodeURIComponent(tab.getAttribute("value")).replace(/%2F/g, '/');
      }
      function init(tabId){
      	updateBody(tabId);
      }
      
      var selectedTab = "tab1"
      </script>
      ----
      
      == Inline Event Handler
      Line: 108
      ----
      <body onload="init('tab1');">
      ----
      

      Solutions

      https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks
      https://www.jenkins.io/doc/developer/security/csp/#inline-event-handlers

            yafenkin Yaroslav Afenkin
            basil Basil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: