New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP tag inside a pair of quotes in script tag under enabling minifyJS #679
Comments
Same here bro, im using:
on windows platform im getting:
but if i remove the
|
The problem comes with minifyJS flag on windows platform, how to solve this ? |
It's the same to me! node express with ejs, before compressed
result in: This will make logic error. And also, if i remove /<%[\s\S]*?%>/ from ignoreCustomFragments list, it leads to an error, thrown by HTMLParser in src/htmlparser.js :
I found the code in the file of src/htmlminifier.js
In the line of 808, the two '\t's are added. Removing them both, the compression is going correctly! I'm not sure what's them adding for. |
But it happens only in windows platform ... in mac it works fine ... |
I found a bug when putting PHP tag
<?php ?>
inside a pair of single/double quotes in script tag<script>
Before compressed:
Actual (after compressed):
Expected:
I tried adding some regex in
ignoreCustomFragments
but it doesn't help.I guess these lines may be related to my issue: 0960482
Or would there be any may that by-pass/escape this issue?
Thank you!
The text was updated successfully, but these errors were encountered: