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

[Exclusion] Extract inline script block and event handler in org/jvnet/hudson/plugins/exclusion/AdministrationPanel/index.jelly

XMLWordPrintable

      Problems

      == Inline Script Block
      Line: 30
      ----
      <script>
                      function releaseExclusionResource(e)
                      {
                      var form = document.freeResource;
                          // Jenkins tests use HtmlUnit which does not support dataset
                          //form.resourceId.value = e.dataset.resourceid;
                          //form.runId.value = e.dataset.runid;
                          form.resourceId.value = e.getAttribute('data-resourceid');
                          form.runId.value = e.getAttribute('data-runid');
                      form.submit();
                      }
                  </script>
      ----
      
      == Inline Event Handler
      Line: 60
      ----
      <a title="Force to release resource" href="#"
                                     onclick="releaseExclusionResource(this); return false;"
                                     data-runid="${resource.runId}"
                                     data-resourceid="${resource.resourceId}">
      ----
      

      Solutions

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

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

              Created:
              Updated: