Open Rikj000 opened 6 months ago
Currently the RemoveComments, and thus also CollapseWhitespace middlewares don't correctly strip out // Comments from JavaScript <script> tags.
RemoveComments
CollapseWhitespace
// Comment
<script>
The described issue leads to broken compressed pages due to JavaScript code being // Commented out.
This also leads to confusion with developers trying to implement this package, some might abandon the package, thinking it is broken while it is not.
Replace all your JavaScript // Comments with <!-- Comment -->s
<!-- Comment -->
Detailed description
Currently the
RemoveComments
,and thus also
CollapseWhitespace
middlewares don't correctly strip out// Comment
s from JavaScript<script>
tags.Context
The described issue leads to broken compressed pages due to JavaScript code being
// Comment
ed out.This also leads to confusion with developers trying to implement this package,
some might abandon the package, thinking it is broken while it is not.
Work Around
Replace all your JavaScript
// Comment
s with<!-- Comment -->
sYour environment