Use lzstring R package for encode/decode Shinylive URL functions#92
Open
parmsam wants to merge 2 commits intoposit-dev:feat/encode-decode-urlfrom
Open
Use lzstring R package for encode/decode Shinylive URL functions#92parmsam wants to merge 2 commits intoposit-dev:feat/encode-decode-urlfrom
parmsam wants to merge 2 commits intoposit-dev:feat/encode-decode-urlfrom
Conversation
This was referenced Jul 23, 2024
Author
|
@wch - Following up on this based on our in-person conversation today. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on great work from @gadenbuie shared in #70 that used original JS implementation via V8. This PR switches over to lzstring package, updates
url_encode_dir(), and addsurl_decode()based on the Python implementation here and here. Nearly there, just seems to add an empty line at the end of scripts on the URL decode. Not complete but aims to get work started again.Example to try out:
shinylive:::url_decode(encoded_url = "https://shinylive.io/r/editor/#code=NobwRAdghgtgpmAXAAjFADugdAJTAGlQGMB7CAFzgqVQBsBLAIwCcpmBPACgGcALeiOwCUAHQhiAxMgAicAGYC4yAKoBJZHJLNkGdMnK8o5ZABNWAd247k-buRIBzVjGQBad67EBXesgA8rhq0PiYAClAOcJxiyMgxyFIAgpj69OS0Sh6eELHkaRnhEHC00WAAEsW0JMgAyvyCAIQiYEL48fFSNfQmcIxsyLRQ7CRexuZpvMgC6KM6ECbII+Qzxj0KEGn0ZFZZ8dz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