[
https://issues.apache.org/jira/browse/WICKET-6680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16874977#comment-16874977
]
Arthur Bogaart commented on WICKET-6680:
----------------------------------------
I've added a PR: https://github.com/apache/wicket/pull/372
> JavaScriptStripper chokes on template literals that contain two forward
> slashes
> -------------------------------------------------------------------------------
>
> Key: WICKET-6680
> URL: https://issues.apache.org/jira/browse/WICKET-6680
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 8.5.0, 9.0.0-M2, 7.14.0
> Reporter: Arthur Bogaart
> Priority: Major
>
> The DefaultJavaScriptCompressor uses the JavaScriptStripper to strip comments
> and whitespace from javascript code when running in production mode, but it
> has no support for / understanding of [template
> literals|https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals].
> As such, it chokes on the following snippet
> {code:java}
> const url = `${protocol}//${hostname}:${port}`;{code}
> as it identifies the two forward slashes as the beginning of a single-line
> comment, and removes the code after it, breaking the javascript.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)