Closed clvs7-gh closed 3 years ago
Hello! Thanks for reporting this issue At the moment, we are dependant on the cheerio library for processing our HTML -- if there is an issue in the cheerio library then this webpack plugin will be subject to its functionality too I will keep an eye on the linked issue - once it has been fixed there, I will upgrade cheerio so that this issue can be resolved.
Description
If this plugin is enabled, escaped html (ex. '<' or '>' ) becomes unescaped. So, this behavior makes unexpected output, and maybe causes potential bug.
For example:
Before
After
Also I found below issue (cheerio's one). This plugin uses cheerio, so it seems below issue is root cause. https://github.com/cheeriojs/cheerio/issues/1219
Do you have any solutions?
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
slackhq/csp-html-webpack-plugin version: 3.0.2
node version: v12.4.0
OS version(s): ArchLinux (latest)
Steps to reproduce:
new CspHtmlWebpackPlugin()
to webpack config to enable this pluginExpected result:
Escaped html should be escaped.
Actual result:
Escaped html becomes unescaped.
Attachments:
My webpack config (plugins section):