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

      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

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

          Basil Crow created issue -
          Basil Crow made changes -
          Assignee Original: vimil [ vimil ]
          Basil Crow made changes -
          Description Original: h4. Problems

          {noformat}
          == Inline Event Handler
          Line: 47
          ----
          <a href="removeHTMLResource?id=${t.id}" onclick="return confirmDelete('${t.name}')">
          ----

          == 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}')">
          ----

          == Inline Script Block
          Line: 82
          ----
          <script>
              function confirmDelete(name) {
                if (confirm("Sure you want to delete ["+name+"]?")) {
                  return true;
                }else{
                  return false;
                }
              }
             </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: 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}')">
          ----
          {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: [htmlresource] Extract inline script blocks and event handlers in com/cwctravel/jenkinsci/plugins/htmlresource/HTMLResourceManagement/index.jelly New: [htmlresource] Extract inline script block and event handler in com/cwctravel/jenkinsci/plugins/htmlresource/HTMLResourceManagement/index.jelly

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

              Created:
              Updated: