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

[tap] Extract inline script block in org/tap4j/plugin/model/TapStreamResult/body.jelly

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor Minor
    • tap-plugin

      Problem

      == Inline Script Block
      Line: 29
      ----
      <script type="text/javascript">
      		<!-- TODO make sure load doesn't happen every time -->
      		function showStackTrace(id,query) {
      			var element = document.getElementById(id)
      			element.style.display = "";
      			document.getElementById(id + "-showlink").style.display = "none";
      			document.getElementById(id + "-hidelink").style.display = "";
      			
      			var rqo = new XMLHttpRequest();
      			rqo.open('GET', query, true);
      			rqo.onreadystatechange = function() { element.innerHTML = rqo.responseText; }  
      			rqo.send(null);
      		}
      		
      		function hideStackTrace(id) {
      			document.getElementById(id).style.display = "none";
      			document.getElementById(id + "-showlink").style.display = "";
      			document.getElementById(id + "-hidelink").style.display = "none";
      		}
        </script>
      ----
      

      Solution

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

          [JENKINS-74247] [tap] Extract inline script block in org/tap4j/plugin/model/TapStreamResult/body.jelly

          Basil Crow created issue -
          Basil Crow made changes -
          Assignee Original: Bruno P. Kinoshita [ kinow ]
          Basil Crow made changes -
          Description Original: h4. Problems

          {noformat}
          == Inline Script Block
          Line: 29
          ----
          <script type="text/javascript">
          <!-- TODO make sure load doesn't happen every time -->
          function showStackTrace(id,query) {
          var element = document.getElementById(id)
          element.style.display = "";
          document.getElementById(id + "-showlink").style.display = "none";
          document.getElementById(id + "-hidelink").style.display = "";

          var rqo = new XMLHttpRequest();
          rqo.open('GET', query, true);
          rqo.onreadystatechange = function() { element.innerHTML = rqo.responseText; }
          rqo.send(null);
          }

          function hideStackTrace(id) {
          document.getElementById(id).style.display = "none";
          document.getElementById(id + "-showlink").style.display = "";
          document.getElementById(id + "-hidelink").style.display = "none";
          }
            </script>
          ----

          == Inline Script Block
          Line: 29
          ----
          <script type="text/javascript">
          <!-- TODO make sure load doesn't happen every time -->
          function showStackTrace(id,query) {
          var element = document.getElementById(id)
          element.style.display = "";
          document.getElementById(id + "-showlink").style.display = "none";
          document.getElementById(id + "-hidelink").style.display = "";

          var rqo = new XMLHttpRequest();
          rqo.open('GET', query, true);
          rqo.onreadystatechange = function() { element.innerHTML = rqo.responseText; }
          rqo.send(null);
          }

          function hideStackTrace(id) {
          document.getElementById(id).style.display = "none";
          document.getElementById(id + "-showlink").style.display = "";
          document.getElementById(id + "-hidelink").style.display = "none";
          }
            </script>
          ----
          {noformat}

          h4. Solution

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

          {noformat}
          == Inline Script Block
          Line: 29
          ----
          <script type="text/javascript">
          <!-- TODO make sure load doesn't happen every time -->
          function showStackTrace(id,query) {
          var element = document.getElementById(id)
          element.style.display = "";
          document.getElementById(id + "-showlink").style.display = "none";
          document.getElementById(id + "-hidelink").style.display = "";

          var rqo = new XMLHttpRequest();
          rqo.open('GET', query, true);
          rqo.onreadystatechange = function() { element.innerHTML = rqo.responseText; }
          rqo.send(null);
          }

          function hideStackTrace(id) {
          document.getElementById(id).style.display = "none";
          document.getElementById(id + "-showlink").style.display = "";
          document.getElementById(id + "-hidelink").style.display = "none";
          }
            </script>
          ----
          {noformat}

          h4. Solution

          [https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks]
          Summary Original: [tap] Extract inline script blocks in org/tap4j/plugin/model/TapStreamResult/body.jelly New: [tap] Extract inline script block in org/tap4j/plugin/model/TapStreamResult/body.jelly
          Shlomo made changes -
          Assignee New: Shlomo [ shlomo_dahan ]
          Shlomo made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Shlomo made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Shlomo made changes -
          Remote Link New: This issue links to "PR (Web Link)" [ 30449 ]

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

              Created:
              Updated: