[
https://issues.apache.org/jira/browse/WICKET-6680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16876156#comment-16876156
]
ASF subversion and git services commented on WICKET-6680:
---------------------------------------------------------
Commit 6b0969a19173ff0764234ee818dd24337f24b715 in wicket's branch
refs/heads/wicket-7.x from Arthur Bogaart
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=6b0969a ]
WICKET-6680 Identify javascript template literals to prevent stripping too mamy
characters
(cherry picked from commit 1e42bb3ba689b3c1584b5b57f6e72211d2978934)
(cherry picked from commit 6d11cb6e8dd138d23111c7d54ae6b48bb87006df)
> 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)