[
https://issues.apache.org/jira/browse/WICKET-7022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrea Del Bene resolved WICKET-7022.
-------------------------------------
Resolution: Fixed
[~mwhesse] Hi, if you want you can try using version 9.13.0-SNAPSHOT which
contains the fix for this issue. Bye!
> JavaScriptStripper fails to detect regular expression correctly
> ---------------------------------------------------------------
>
> Key: WICKET-7022
> URL: https://issues.apache.org/jira/browse/WICKET-7022
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 9.12.0
> Reporter: Martin Hesse
> Assignee: Andrea Del Bene
> Priority: Major
> Fix For: 9.13.0
>
> Attachments: summernote-bs5.js, summernote-bs5.min.js
>
>
> The {{JavaScriptStripper}} fails to accurately detect regular expressions in
> some cases.
> In the example below it fails to switch into the {{REG_EXP}} state at
> '{{{}return/[{}}}', and will then switch to {{LINE_COMMENT}} state when
> parsing '{{{}//{}}}', which will then lead to the entire rest of the
> JavaScript code to be cut off, making the code unparseable by the client.
> {{return/[-a-zA-Z0-9@:%._\+~#=]\{2,256}\.[a-z]\{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi.test(t)}};}}
> An example of a webjar containing javascript, that will trigger the bug can
> be found here:
> [https://search.maven.org/artifact/org.webjars.npm/summernote/0.8.20/jar] -
> also see attached JS files below.
> Current workaround is to disable compression:
> getResourceSettings().setJavaScriptCompressor(null);
--
This message was sent by Atlassian Jira
(v8.20.10#820010)