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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when rendering emoji on Safari #69

Open
DontGiveAFck opened this issue Dec 27, 2023 · 2 comments
Open

Error when rendering emoji on Safari #69

DontGiveAFck opened this issue Dec 27, 2023 · 2 comments

Comments

@DontGiveAFck
Copy link

DontGiveAFck commented Dec 27, 2023

Steps To Reproduce

  1. open https://modern-screenshot.vercel.app/ on Safari 17.1 macos
  2. add emoji symbol to the page (馃榾)
  3. notice that there is an error in console
image
Unhandled Promise Rejection: URIError: String contained an illegal UTF-16 sequence.

<!-- Provide a log message if relevant -->

Your Environment

  • modern-screenshot version on test env
  • Safari 17.1, macOS Sonoma 14.1.1, apple chip
@jbergfi
Copy link

jbergfi commented Jan 10, 2024

I had same problem here. After a bit of browsing of the code I found the removeControlCharacter flag and setting that to false seems to fix the issue. Note sure what the flag is supposed to do but it seems it removes too much.

So adding this to options should do the trick:

let options = {
  features: {
    removeControlCharacter: false
  }
}

@debugtheworldbot
Copy link

I had same problem here. After a bit of browsing of the code I found the removeControlCharacter flag and setting that to false seems to fix the issue. Note sure what the flag is supposed to do but it seems it removes too much.

So adding this to options should do the trick:

let options = {
  features: {
    removeControlCharacter: false
  }
}

Thanks. you saved my day

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

3 participants