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

fix(toUTF8): replace deprecated unescape with decodedURIComponent #66

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cachelina
Copy link

This PR updates the toUTF8 function to use decodedURIComponent, instead of the deprecated unescape as suggested here MDN.

@satazor
Copy link
Owner

satazor commented Dec 28, 2022

Hey! The changes in this PR are giving wrong md5 results unfortunately. :/

@cachelina
Copy link
Author

Hey! The changes in this PR are giving wrong md5 results unfortunately. :/

Hey! I’ll take a look at this again :) I thought decodeURIComponent had the correct encodings to begin with, and that’s why I updated the tests.

@cachelina
Copy link
Author

Hey @satazor I just pushed up some changes. Specifically, I reimplemented the native unescape from V8. I noticed there were a few functions responsible for converting characters to hex in the codebase.

However, I wasn't sure which one would accomplish what I needed, so I ported the hexing function from V8. Let me know your thoughts 🙂

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