Skip to content

Conversation

@captbaritone
Copy link
Owner

@captbaritone captbaritone commented Dec 16, 2025

- Fix getAsDataURI to properly encode UTF-8 characters before base64 conversion
- Add React import required for JSX
- Add comprehensive unit tests for playlistHtml including non-Latin-1 characters
- Test coverage includes emoji, Chinese, and Cyrillic characters

The previous implementation used window.btoa() directly which only supports Latin-1 (ISO-8859-1) characters. This caused InvalidCharacterError when playlist track names contained UTF-8 characters like emoji or non-Latin scripts.

The fix encodes UTF-8 strings to percent-encoded format first, then converts to Latin-1 bytes before base64 encoding, ensuring all Unicode characters are properly preserved.
@netlify
Copy link

netlify bot commented Dec 16, 2025

Deploy Preview for tourmaline-kringle-c98715 canceled.

Name Link
🔨 Latest commit a209c09
🔍 Latest deploy log https://app.netlify.com/projects/tourmaline-kringle-c98715/deploys/69418cd59047690008649a81

@github-actions
Copy link

Size Change: 0 B 🆕

Total Size: 0 B

compressed-size-action

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

Successfully merging this pull request may close these issues.

2 participants