trurl: allow "control bytes" in JSON output#333
Merged
Conversation
For example when doing
trurl 'http://example.org/%18' --json
Adapted and extended test cases to verify.
Fixes #262
Reported-by: Emanuele Torre
Collaborator
|
@bagder $ ./trurl 'http://example.org/%18' -g '{path}'
trurl note: URL decode error, most likely because of rubbish in the input (path)
|
Member
Author
|
Correct, as I like to focus on one thing per issue but also that the "regular" output is different and might need other considerations. Should we really allow control codes to be output like this? |
Collaborator
I mentioned it because this PR closed #262
I don't see why not, also note that this is only causing errors for non- $ trurl -g '{fragment}' 'https://example.org/compiler#def%20main:%20%0a%09print%20"hello"'
trurl note: URL decode error, most likely because of rubbish in the input (fragment)
$ trurl -g '{query:code}' 'https://example.org/compiler?code=def%20main:%0a%09print%20"hello"'
def main:
print "hello"Incidentally, unrelated, but I have noticed that $ trurl -g '{query:code}' 'https://example.org/compiler?code=def+main:%0a%09print+"hello"'
def+main:
print+"hello" |
Member
Author
It does now! 😁 |
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.
For example when doing
Adapted and extended test cases to verify.
Fixes #262
Reported-by: Emanuele Torre