-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
Issue with generated tags #355
Comments
Thanks for the issue! I've added a fix to the PS: I don't think I'd like to add an exclude list or something, I'd prefer fixing the issues for good! ;-) |
WOW, that was fast. Meanwhile, I will prepare a few more issues that we've found. Regards, |
Hey @tdewolff
Thanks for the awesome minifier.
I'm the author of SG Optimizer plugin, which is used by more than 1 million users and we really love your minifiers and use them for our clients.
We decided to switch our old regex-based HTML minification to this one, but we broke a lot of sites, so we have reverted the change until we fix the issues that have been reported.
One of the main issues was with dynamically generated tags. Here is an example:
When the code above is minified, the end script tag is closed near the following string:
</scr' + 'ipt>'
and the other part of the script is rendered as html/string.Here is the command we use:
minify --type=html --html-keep-conditional-comments=true --html-keep-quotes=true --html-keep-end-tags=true --html-keep-default-attrvals=true --xml-keep-whitespace=true
Is there a way to exclude some parts of the page(something like exclude list maybe?) or is there a way to ignore such parts of the code?
We would happily contribute to the project in any way possible.
If you have any questions or if there is anything else you want to discuss, you can contact me via email: stanimir.stoyanov@siteground.com
Regards,
Stanimir
The text was updated successfully, but these errors were encountered: