Description
org.apache.wicket.util.string.JavascriptStripper#stripCommentsAndWhitespace doesn't check the context when looking for multiline comments. In my case, it interprets the default accept header in the jQuery source code as a multiline comment:
accepts: {
xml: "application/xml, text/xml",
html: "text/html",
script: "text/javascript, application/javascript",
json: "application/json, text/javascript",
text: "text/plain",
_default: "/"
}
The culprit being this string: "/"
I don't have a patch and I wouldn't try to write my own JS parser. Maybe replacing the current implementation with a Rhino-based one is an option. Its available via Maven:
<dependency>
<groupId>rhino</groupId>
<artifactId>js</artifactId>
<version>1.7R1</version>
</dependency>