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

[htmlresource] Extract inline script block and event handler in com/cwctravel/jenkinsci/plugins/htmlresource/HTMLResourceManagement/index.jelly

XMLWordPrintable

      Problems

      == Inline Script Block
      Line: 82
      ----
      <script>
          function confirmDelete(name) {
            if (confirm("Sure you want to delete ["+name+"]?")) {
              return true;
            }else{
              return false;
            }
          }
         </script>
      ----
      
      == Inline Event Handler
      Line: 47
      ----
      <a href="removeHTMLResource?id=${t.id}" onclick="return confirmDelete('${t.name}')">
      ----
      

      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: