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

Quote marks in messages are not escaped, leading to malformed JSON #124

Open
TJC opened this issue Apr 30, 2024 · 0 comments
Open

Quote marks in messages are not escaped, leading to malformed JSON #124

TJC opened this issue Apr 30, 2024 · 0 comments

Comments

@TJC
Copy link

TJC commented Apr 30, 2024

To reproduce, attempt to send a message such as:

echo 'hello "world"...' | slack chat send --channel test --pretext "a test message"

You will receive an error:

{
  "ok": false,
  "error": "no_text"
}

I believe this is due to the way the JSON body is built in https://github.com/rockymadden/slack-cli/blob/master/src/slack#L224 where quote marks aren't escaped.

Update: Due to my frustration with this, I created a new tool which is just designed to do one thing - post text messages to Slack: https://github.com/TJC/simple-slack-message

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

No branches or pull requests

1 participant