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

Broken encoding since v9.0.0 #493

Closed
ligiaandreica opened this issue Aug 14, 2024 · 3 comments
Closed

Broken encoding since v9.0.0 #493

ligiaandreica opened this issue Aug 14, 2024 · 3 comments

Comments

@ligiaandreica
Copy link

ligiaandreica commented Aug 14, 2024

Hi! 👋 I've noticed a change in how juice deals with encoding after upgrading from v8.1.0 to v9.0.0.

Running the following command containing '

juice(
      `<body>
        <p>Hi, we&#x27;re testing!</p>
      </body>`,
    )

gives the following results:

v8.1.0

<body>
        <p>Hi, we&#x27;re testing!</p>
</body>
image

v9.0.0 - changes & char to &amp; breaking the UI.

<body>
        <p>Hi, we&amp;#x27;re testing!</p>
</body>
image
@AngeloChecked
Copy link

AngeloChecked commented Aug 14, 2024

Hi @ligiaandreica!

@gafreax and I ran into the same issue you did, which is connected to this commit: cheeriojs/cheerio@50b5d5c. While the patch is allowed as a peer dependency, it introduced a bug: https://github.com/Automattic/juice/blob/master/package.json#L38.

One possible solution is to force the peer dependency to use the RC version in the package.json:

	"overrides": {
		"cheerio": "1.0.0-rc.12"
	},

bye!

@cossssmin
Copy link
Collaborator

Will have to check the encoding issue in particular (parser options are now passed under an xml key to cheerio, but indeed cheerio unexpectedly released a bunch of breaking changes from a Release Candidate.

We should probably pin Juice 10.x to use [email protected] otherwise v1.0.0 gets installed.

@jrit
Copy link
Collaborator

jrit commented Aug 17, 2024

10.0.1 is released :)

@jrit jrit closed this as completed Aug 17, 2024
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

4 participants