Arthur Bogaart created WICKET-6680:
--------------------------------------
Summary: 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: 7.14.0, 9.0.0-M2, 8.5.0
Reporter: Arthur Bogaart
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)