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

fix: data uri base64 encoded content with whitespace #3289

Merged
merged 1 commit into from
May 25, 2023

Conversation

ahabhgk
Copy link
Collaborator

@ahabhgk ahabhgk commented May 24, 2023

Related issue (if exists)

fixes #3288

Summary

馃 Generated by Copilot at 2f779c4

Fix a bug in the data_uri plugin and add test cases for data URI imports. The bug caused base64 decoding to fail for data URIs with whitespace. The test cases cover different encoding and content types for data URIs in CSS and JS files.

Walkthrough

馃 Generated by Copilot at 2f779c4

  • Fix base64 decoding bug in data URI scheme plugin by trimming the body before decoding (link)
    • Test importing base64-encoded SVG content in CSS file (link)
    • Test importing hex-encoded binary content in JS file (link)

@ahabhgk ahabhgk requested a review from hardfist as a code owner May 24, 2023 12:24
@github-actions github-actions bot added release: bug fix team The issue/pr is created by the member of Rspack. labels May 24, 2023
@ahabhgk ahabhgk requested a review from h-a-n-a May 24, 2023 12:26
@ahabhgk ahabhgk added this pull request to the merge queue May 25, 2023
Merged via the queue into main with commit 808a231 May 25, 2023
17 checks passed
@ahabhgk ahabhgk deleted the fix-encoded-content branch May 25, 2023 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

data uri base64 encoded content with whitespace have Base64Error
2 participants