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

[pollscm] Extract inline script block and event handler in org/jenkinsci/plugins/pollscm/PollNowAction/action.jelly

XMLWordPrintable

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

      Problems

      == Inline Script Block
      Line: 35
      ----
      <script>
                  function poll_${id}(a) {
                      fetch(a.href, {
                        method: "post",
                        headers: crumb.wrap({}),
                      });
                      hoverNotification('${%Poll scheduled}',a.parentNode);
                      return false;
                  }
              </script>
      ----
      
      == Inline Event Handler
      Line: 33
      ----
      <l:task icon="${icon}" title="${action.displayName}"
                      href="${h.getActionUrl(it.url,action)}/polling" onclick="${'return poll_' + id + '(this)'}" post="true"/>
      ----
      

      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: