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

Unescaped control characters fire an error in jq #8

Closed
ChaoticWeg opened this issue Aug 21, 2018 · 0 comments
Closed

Unescaped control characters fire an error in jq #8

ChaoticWeg opened this issue Aug 21, 2018 · 0 comments
Labels
wontfix This will not be worked on

Comments

@ChaoticWeg
Copy link
Collaborator

ChaoticWeg commented Aug 21, 2018

Control characters in the inclusive range U+0000 to U+001F are invalid JSON per section 7 of RFC 7159, and jq handles this by firing off a slightly difficult-to-debug error (in our use case). Because of this, passing any unescaped control characters including CR, LF, and tabs causes discord.sh to fail to send the message (specifically, Discord rejects the message with "cannot send an empty message" since jq bails out).

As of now, this will not be fixed. It will be up to the end user to escape desired control characters using sed and/or tr.

Reasons:

  • Escaping and/or removing control characters inside discord.sh requires us to add dependencies, specifically sed and/or tr. This breaks the goal of maximum portability.

Sources:

Workaround examples:

Do you have an example of a workaround you came up with? Comment it here.

@ChaoticWeg ChaoticWeg added the wontfix This will not be worked on label Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant