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

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=16876154#comment-16876154 ] 

ASF subversion and git services commented on WICKET-6680:
---------------------------------------------------------

Commit 6d11cb6e8dd138d23111c7d54ae6b48bb87006df in wicket's branch refs/heads/wicket-8.x from Arthur Bogaart
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=6d11cb6 ]

WICKET-6680 Identify javascript template literals to prevent stripping too mamy characters

(cherry picked from commit 1e42bb3ba689b3c1584b5b57f6e72211d2978934)


> 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)