puppeteer v1.16.0 breaks non-ASCII chars in page.setContent
phihag opened this issue · comments
Philipp Hagemeister commented
Steps to reproduce
Tell us about your environment:
- Puppeteer version: v1.16.0
- Platform / OS version: Linux
- Node.js version: v10.15.3
What steps will reproduce the problem?
The following code works in puppeteer v1.15.0, but the assertion fails in puppeteer v1.16.0:
(async () => {
const browser = await require('puppeteer').launch({args: ['--no-sandbox']});
const page = await browser.newPage();
await page.setContent('_\u2714_');
require('assert')((await page.content()).includes('_\u2714_'));
})();
In other words, non-ASCII characters such as ✔ cannot be set with setContent
.
The offending commit seems to be 76b24e6 .
Joel Einbinder commented
I can't repro with the code you gave. Are you running puppeteer against an older version of chrome?
Philipp Hagemeister commented
Here is a repository demonstrating the problem. If you are concerned about reproducibility, there's even a dockerfile which shows the bug.
However, in puppeteer v1.17.0, everything works again. That's good enough for me.
Andrey Lushnikov commented
For the record: this was a dupe of #4443