Comments in CSS may be mangled if the comment contain a newline
Closed this issue · 0 comments
ericcornelissen commented
Bug Report
- Package(s): language-css
- Version(s):
v0.1.26
Description
When mangling a CSS stylesheets with comments, the language-css
plugin might accidentally mangle in comments if the comment contains a newline.
Proof of Concept
-
Have a CSS file with mangle-able CSS in a CSS comment (
/* */
). For example:.cls-foo { color: purple; } /* .cls-bar { color: orange; } */
-
Run WebMangler CLI (version
0.1.6
) with WebMangler Core (version0.1.24
) and the default mangler plugins & default language plugins (at the exact versions found in the WebMangler Corepackage.json
). -
Observe that the comments have been mangled. For the example above:
.a { color: purple; } /* .b { color: orange; } */