Skip to content

Conversation

@rungta
Copy link

@rungta rungta commented Oct 26, 2018

Enkoder does not currently support multibyte characters such as . For example, encoding don’t results in donâ��t.

This pull request adds full support for unicode characters (including Emoji 😀). It is based on CloudFlare’s solution and uses escape() to percentage encode the final reconstructed string's bytes, and then decodeURIComponent() to properly handle unicode characters.

rungta and others added 5 commits October 26, 2018 19:42
Use escape() to percentage encode the final reconstructed string to percentage encode the string's bytes, and then decodeURIComponent() to properly handle unicode characters (as explained in https://blog.jse.li/posts/cloudflare-scrape-shield/).
Fix `TypeError: Cannot read property 'parentNode' of null` bug
- No longer necessary in modern browsers
- Ensures the enkoder still works when used with scripts that compact source code and strip out comments
Remove comments before and after inserted JS
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