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

[multi-module-tests-publisher] Extract inline script block and event handlers in com/cwctravel/hudson/plugins/multimoduletests/junit/History/index.jelly

      Problems

      == Inline Script Block
      Line: 31
      ----
      <script type="text/javascript">
      			function setCount() {
      				document.getElementById("graph").src = "countGraph/png?${rangeParameters}";
      				document.getElementById("graph").lazyMap = "countGraph/map?${rangeParameters}";
                      document.getElementById("graph").alt = "[Count graph]";
      				document.getElementById("duration-link").style.display = "";
      				document.getElementById("count-link").style.display = "none";
      			}
      			function setDuration() {
      				document.getElementById("graph").src = "durationGraph/png?${rangeParameters}"
      				document.getElementById("graph").lazyMap = "durationGraph/map?${rangeParameters}"
                      document.getElementById("graph").alt = "[Duration graph]";
      				document.getElementById("duration-link").style.display = "none";
      				document.getElementById("count-link").style.display = "";
      			}
      		 </script>
      ----
      
      == Inline Event Handler
      Line: 58
      ----
      <a id="count-link" href="#" onclick='javascript:setCount()'>
      ----
      
      == Inline Event Handler
      Line: 59
      ----
      <a id="duration-link" href="#" onclick="javascript:setDuration()" style="display:none;">
      ----
      

      Solutions

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

          [JENKINS-74186] [multi-module-tests-publisher] Extract inline script block and event handlers in com/cwctravel/hudson/plugins/multimoduletests/junit/History/index.jelly

          Basil Crow created issue -
          Basil Crow made changes -
          Description Original: h4. Problems

          {noformat}
          == Inline Event Handler
          Line: 58
          ----
          <a id="count-link" href="#" onclick='javascript:setCount()'>
          ----

          == Inline Event Handler
          Line: 59
          ----
          <a id="duration-link" href="#" onclick="javascript:setDuration()" style="display:none;">
          ----

          == Inline Script Block
          Line: 31
          ----
          <script type="text/javascript">
          function setCount() {
          document.getElementById("graph").src = "countGraph/png?${rangeParameters}";
          document.getElementById("graph").lazyMap = "countGraph/map?${rangeParameters}";
                          document.getElementById("graph").alt = "[Count graph]";
          document.getElementById("duration-link").style.display = "";
          document.getElementById("count-link").style.display = "none";
          }
          function setDuration() {
          document.getElementById("graph").src = "durationGraph/png?${rangeParameters}"
          document.getElementById("graph").lazyMap = "durationGraph/map?${rangeParameters}"
                          document.getElementById("graph").alt = "[Duration graph]";
          document.getElementById("duration-link").style.display = "none";
          document.getElementById("count-link").style.display = "";
          }
          </script>
          ----

          == Inline Event Handler
          Line: 58
          ----
          <a id="count-link" href="#" onclick='javascript:setCount()'>
          ----

          == Inline Event Handler
          Line: 59
          ----
          <a id="duration-link" href="#" onclick="javascript:setDuration()" style="display:none;">
          ----

          == Inline Script Block
          Line: 31
          ----
          <script type="text/javascript">
          function setCount() {
          document.getElementById("graph").src = "countGraph/png?${rangeParameters}";
          document.getElementById("graph").lazyMap = "countGraph/map?${rangeParameters}";
                          document.getElementById("graph").alt = "[Count graph]";
          document.getElementById("duration-link").style.display = "";
          document.getElementById("count-link").style.display = "none";
          }
          function setDuration() {
          document.getElementById("graph").src = "durationGraph/png?${rangeParameters}"
          document.getElementById("graph").lazyMap = "durationGraph/map?${rangeParameters}"
                          document.getElementById("graph").alt = "[Duration graph]";
          document.getElementById("duration-link").style.display = "none";
          document.getElementById("count-link").style.display = "";
          }
          </script>
          ----
          {noformat}

          h4. Solutions

          [https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks]
          [https://www.jenkins.io/doc/developer/security/csp/#inline-event-handlers]
          New: h4. Problems

          {noformat}
          == Inline Script Block
          Line: 31
          ----
          <script type="text/javascript">
          function setCount() {
          document.getElementById("graph").src = "countGraph/png?${rangeParameters}";
          document.getElementById("graph").lazyMap = "countGraph/map?${rangeParameters}";
                          document.getElementById("graph").alt = "[Count graph]";
          document.getElementById("duration-link").style.display = "";
          document.getElementById("count-link").style.display = "none";
          }
          function setDuration() {
          document.getElementById("graph").src = "durationGraph/png?${rangeParameters}"
          document.getElementById("graph").lazyMap = "durationGraph/map?${rangeParameters}"
                          document.getElementById("graph").alt = "[Duration graph]";
          document.getElementById("duration-link").style.display = "none";
          document.getElementById("count-link").style.display = "";
          }
          </script>
          ----

          == Inline Event Handler
          Line: 58
          ----
          <a id="count-link" href="#" onclick='javascript:setCount()'>
          ----

          == Inline Event Handler
          Line: 59
          ----
          <a id="duration-link" href="#" onclick="javascript:setDuration()" style="display:none;">
          ----
          {noformat}

          h4. Solutions

          [https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks]
          [https://www.jenkins.io/doc/developer/security/csp/#inline-event-handlers]
          Summary Original: [multi-module-tests-publisher] Extract inline script blocks and event handlers in com/cwctravel/hudson/plugins/multimoduletests/junit/History/index.jelly New: [multi-module-tests-publisher] Extract inline script block and event handlers in com/cwctravel/hudson/plugins/multimoduletests/junit/History/index.jelly

            Unassigned Unassigned
            basil Basil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: