Nexory commented on code in PR #1880:
URL: https://github.com/apache/wicket/pull/1880#discussion_r4546226810


##########
wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js:
##########
@@ -229,6 +229,79 @@
                }
        };
 
+       /**
+        * Trusted Types
+        *
+        * A page with the Content-Security-Policy "require-trusted-types-for 
'script'" accepts no
+        * strings at DOM sinks such as innerHTML. Wicket trusts the markup and 
the scripts of an Ajax
+        * response, so the policy 'wicket' passes them on unchanged. They stay 
strings where the
+        * browser has no Trusted Types or the page does not allow the policy.
+        */
+       Wicket.TrustedTypes = (function () {

Review Comment:
   Added in afcb17a: the comment on `Wicket.TrustedTypes` says it must only be 
given markup and scripts that come from the server, and the guide tells 
applications not to pass untrusted strings to `Wicket.DOM.replace`, 
`Wicket.DOM.add` or `Wicket.Xml.parse`.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to