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

[cucumber-testresult-plugin] Extract inline script block in org/jenkinsci/plugins/cucumber/jsontestsupport/CucumberTestResult/body.jelly

XMLWordPrintable

      Problem

      == Inline Script Block
      Line: 31
      ----
      <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

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

              Created:
              Updated: