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

html <script> tags are not loading in active choice v2.0 parameters.

    Details

    • Similar Issues:

      Description

      Unable to achieve below scenario as <script> tags are not working in AC 2.0 

      Reactive Reference Dynamic Parameter Controls

      https://wiki.jenkins.io/display/JENKINS/Reactive+Reference+Dynamic+Parameter+Controls.

      Please let me know, Is there any way to achieve without AC older version?

       

        Attachments

          Activity

          Hide
          ioannis Ioannis Moutsatsos added a comment -

          Starting with Active Choices v2.0, sandboxed Groovy scripts for Active Choices Reactive Reference Parameter will no longer emit HTML that is considered unsafe, such as <script> tags. This may result in behavior changes on Build With Parameters forms, such as missing elements. To resolve this issue, Groovy scripts emitting HTML will need to be configured to run outside the script security sandbox, possibly requiring separate administrator approval in In-Process Script Approval.

          Show
          ioannis Ioannis Moutsatsos added a comment - Starting with Active Choices v2.0, sandboxed  Groovy scripts for  Active Choices Reactive Reference Parameter  will no longer emit HTML that is considered unsafe, such as  <script>  tags. This may result in behavior changes on  Build With Parameters  forms, such as missing elements. To resolve this issue, Groovy scripts emitting HTML will need to be configured to run outside the script security sandbox, possibly requiring separate administrator approval in  In-Process Script Approval .
          Hide
          ioannis Ioannis Moutsatsos added a comment -

          Fixed in updated version of Active Choices

          Show
          ioannis Ioannis Moutsatsos added a comment - Fixed in updated version of Active Choices
          Hide
          omrisela Omri Sela added a comment -

          I'm currently experimenting with AC v2.1 and facing the same problem.

          The <script .../> HTML tags do appear in the DOM but are not being executed. Even DOM elements referring to functions defined in these <script... /> blocks (i.e. onclikck="func();") fail with function not found.

          I see the last comment (above, from 19-Feb-2019 by Ioannis Moutsatsos) states it had been fixed. I'm using the plugin from the main Jenkin repo. 

          Any suggestions how to bypass this?

          Currently I'm writing the entire JS code in the onlick="..." event of the button I'm showing (which works).

           

           

          Show
          omrisela Omri Sela added a comment - I'm currently experimenting with AC v2.1 and facing the same problem. The <script .../> HTML tags do appear in the DOM but are not being executed. Even DOM elements referring to functions defined in these <script... /> blocks (i.e. onclikck="func();") fail with function not found. I see the last comment (above, from 19-Feb-2019 by Ioannis Moutsatsos ) states it had been fixed. I'm using the plugin from the main Jenkin repo.  Any suggestions how to bypass this? Currently I'm writing the entire JS code in the onlick="..." event of the button I'm showing (which works).    

            People

            • Assignee:
              kinow Bruno P. Kinoshita
              Reporter:
              prbht Prabhat B
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: