-
Task
-
Resolution: Unresolved
-
Minor
Problem
== Inline Script Block Line: 28 ---- <script type="text/javascript"> function toggleAll(action) { var xmlBlocks = []; <j:forEach var="provider" items="${it.providers}"> <j:forEach var="conf" items="${provider.allConfigs}"> <util:replace value="${conf.id}" var="classId" old="." new="_" /> xmlBlocks.push("${classId}"); </j:forEach> </j:forEach> if(action == "hide") { for(var i = 0; i < xmlBlocks.length; i++) { $$("." + xmlBlocks[i]).each(Element.hide); $$("." + xmlBlocks[i] + "a").each(Element.show); } } else { for(var i = 0; i < xmlBlocks.length; i++) { $$("." + xmlBlocks[i] + "a").each(Element.hide); $$("." + xmlBlocks[i]).each(Element.show); } } } </script> ----
Solution
https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks
[JENKINS-74558] [xpath-config-viewer] Extract inline script block in WEB-INF/classes/org/jenkinsci/plugins/viewer/XPathConfigViewerPlugin/index.jelly
Description |
Original:
h4. Problems {noformat} == Inline Script Block Line: 28 ---- <script type="text/javascript"> function toggleAll(action) { var xmlBlocks = []; <j:forEach var="provider" items="${it.providers}"> <j:forEach var="conf" items="${provider.allConfigs}"> <util:replace value="${conf.id}" var="classId" old="." new="_" /> xmlBlocks.push("${classId}"); </j:forEach> </j:forEach> if(action == "hide") { for(var i = 0; i < xmlBlocks.length; i++) { $$("." + xmlBlocks[i]).each(Element.hide); $$("." + xmlBlocks[i] + "a").each(Element.show); } } else { for(var i = 0; i < xmlBlocks.length; i++) { $$("." + xmlBlocks[i] + "a").each(Element.hide); $$("." + xmlBlocks[i]).each(Element.show); } } } </script> ---- == Inline Script Block Line: 28 ---- <script type="text/javascript"> function toggleAll(action) { var xmlBlocks = []; <j:forEach var="provider" items="${it.providers}"> <j:forEach var="conf" items="${provider.allConfigs}"> <util:replace value="${conf.id}" var="classId" old="." new="_" /> xmlBlocks.push("${classId}"); </j:forEach> </j:forEach> if(action == "hide") { for(var i = 0; i < xmlBlocks.length; i++) { $$("." + xmlBlocks[i]).each(Element.hide); $$("." + xmlBlocks[i] + "a").each(Element.show); } } else { for(var i = 0; i < xmlBlocks.length; i++) { $$("." + xmlBlocks[i] + "a").each(Element.hide); $$("." + xmlBlocks[i]).each(Element.show); } } } </script> ---- {noformat} h4. Solution [https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks] |
New:
h4. Problem {noformat} == Inline Script Block Line: 28 ---- <script type="text/javascript"> function toggleAll(action) { var xmlBlocks = []; <j:forEach var="provider" items="${it.providers}"> <j:forEach var="conf" items="${provider.allConfigs}"> <util:replace value="${conf.id}" var="classId" old="." new="_" /> xmlBlocks.push("${classId}"); </j:forEach> </j:forEach> if(action == "hide") { for(var i = 0; i < xmlBlocks.length; i++) { $$("." + xmlBlocks[i]).each(Element.hide); $$("." + xmlBlocks[i] + "a").each(Element.show); } } else { for(var i = 0; i < xmlBlocks.length; i++) { $$("." + xmlBlocks[i] + "a").each(Element.hide); $$("." + xmlBlocks[i]).each(Element.show); } } } </script> ---- {noformat} h4. Solution [https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks] |
Summary | Original: [xpath-config-viewer] Extract inline script blocks in WEB-INF/classes/org/jenkinsci/plugins/viewer/XPathConfigViewerPlugin/index.jelly | New: [xpath-config-viewer] Extract inline script block in WEB-INF/classes/org/jenkinsci/plugins/viewer/XPathConfigViewerPlugin/index.jelly |