solomax commented on a change in pull request #376: WICKET-6682 add CSP nonce support: initial commit URL: https://github.com/apache/wicket/pull/376#discussion_r302991282
########## File path: wicket-core/src/main/java/org/apache/wicket/core/util/string/JavaScriptUtils.java ########## @@ -227,10 +269,23 @@ public static void writeJavaScript(final Response response, final CharSequence t */ public static void writeOpenTag(final Response response, String id) { - response.write("<script type=\"text/javascript\" "); - if (id != null) - { - response.write("id=\"" + Strings.escapeMarkup(id) + "\""); + HeaderItemAttributeMap attributes = new HeaderItemAttributeMap(); + attributes.add(HeaderItemAttribute.TYPE, "text/javascript"); + if (id != null) { Review comment: code style ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services