Skip to content
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

Double encodes html entities (&,  , etc) #125

Open
4 of 9 tasks
eamodio opened this issue Oct 16, 2024 · 1 comment
Open
4 of 9 tasks

Double encodes html entities (&,  , etc) #125

eamodio opened this issue Oct 16, 2024 · 1 comment

Comments

@eamodio
Copy link

eamodio commented Oct 16, 2024

Description

Describe your issue here.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

slackhq/csp-html-webpack-plugin version: v5.1.0

node version: v20.11.1

OS version(s): all

Seems to have broken sometime recently, I'm guessing it is related to #75

Steps to reproduce:

  1. Have html entities (&,  , etc) in your html template file

Expected result:

Observe html entities are unaffected

Actual result:

Observe that they get double encoded, & becomes &,   becomes  

Attachments:

OSS project: https://github.com/gitkraken/vscode-gitlens can see when the settings.html file gets built (https://github.com/gitkraken/vscode-gitlens/blob/e3795f8a80eb43b91b3c7736d7705c6316b921f7/webpack.config.mjs#L323)

@nzaytsev
Copy link

It looks like it's caused by wrong version of cheerio transitive dependency. Version 1.0.0 is fetched by default when run npm i | yarn | pnpm i, but ^1.0.0-rc.5 is required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants