You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2019/07/01 12:31:00 UTC

[jira] [Resolved] (WICKET-6680) JavaScriptStripper chokes on template literals that contain two forward slashes

     [ https://issues.apache.org/jira/browse/WICKET-6680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-6680.
-------------------------------------
       Resolution: Fixed
         Assignee: Martin Grigorov
    Fix Version/s: 9.0.0-M3
                   7.15.0
                   8.6.0

> 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
>            Assignee: Martin Grigorov
>            Priority: Major
>             Fix For: 8.6.0, 7.15.0, 9.0.0-M3
>
>
> 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)