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

Serialize text resources as utf8 #1209

Merged
merged 3 commits into from
Mar 15, 2023
Merged

Serialize text resources as utf8 #1209

merged 3 commits into from
Mar 15, 2023

Conversation

samarsault
Copy link
Contributor

@samarsault samarsault commented Mar 13, 2023

Fixes #1204

Percy CLI Server expects base64 data for resources by default. There's no straightforward way to convert unicode javascript strings, which have a 2 byte character size to base64 in the browser. Hence, we modify CLI server to accept resources with a text mimetype with UTF8 encoding

Copy link
Contributor

@itsjwala itsjwala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Add more description
  • Add a test in discovery - when file is text/css it should use utf decode

@itsjwala itsjwala merged commit 9f7c48f into master Mar 15, 2023
@itsjwala itsjwala deleted the btoa-fix branch March 15, 2023 06:18
@itsjwala itsjwala added the 🐛 bug Something isn't working label Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Failed to execute 'btoa' on 'Window` due to some CSS from bootstrap 5
2 participants