Skip to content

Conversation

@joevennix
Copy link
Contributor

Reproduce: Try to minimize a document that has a <script> tag that points to the following code:

var $=1;if(2>$&&true)return;

You'll get an error, because of this line. The $& is treated as a reference to the match in the regex. The fix is to pass a function that returns the string, which does not have pattern matches interpreted.

@jrit
Copy link
Owner

jrit commented Mar 28, 2015

Thanks @joevennix - change looks good, I'm going to merge it in and publish a release in the near future.

jrit added a commit that referenced this pull request Mar 28, 2015
Prevent replacement pattern matches in assets.
@jrit jrit merged commit c2e148d into jrit:master Mar 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants