Skip to content

Escape encoding of special character to avoid crash of bto #547

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

Merged
merged 30 commits into from
May 27, 2025

Conversation

CoveMB
Copy link
Contributor

@CoveMB CoveMB commented May 13, 2025

If a contract contained special characters opening it with remix would fail as btoa would not support special characters.
The following change will escape special characters before encoding.

This will ensure that the app does not crash in the presence of special characters.
A change has also been proposed on remix side to support decoding of the escaped special characters.

Behavior with only this merge request

Screenshot 2025-05-13 at 4 58 04 PM

Behavior after support on remix side

Screenshot 2025-05-13 at 4 57 03 PM

Fixes #545

@CoveMB CoveMB requested a review from ericglau May 13, 2025 20:56
@ericglau
Copy link
Member

🔥 Nice. Let's wait for the Remix part before proceeding with this PR, since otherwise the decoding would be incorrect.

@CoveMB
Copy link
Contributor Author

CoveMB commented May 21, 2025

Got merged on Remix's side

Copy link
Member

@ericglau ericglau left a comment

Choose a reason for hiding this comment

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

LGTM! I think we'd still need to wait for the next Remix release before merging.

@CoveMB CoveMB enabled auto-merge (squash) May 27, 2025 13:48
@CoveMB CoveMB merged commit 13863af into OpenZeppelin:master May 27, 2025
14 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable Open in Remix button if contract has Unicode characters
3 participants