Invalid JSON because of curly quotes
jphorn opened this issue · 6 comments
Past Issues Searched
- I have searched open and closed issues to make sure that the bug has not yet been reported
Issue is a Bug Report
- This is a bug report and not a feature request
Describe the bug
I keep getting Invalid JSON for the Outgoing Webhook step because Slack's stupid form inputs insists on mangling the quotes as curly quotes. Is there something to prevent this on your end?
Expected behavior
No curly quotes for json inputs
Screenshots
https://share.cleanshot.com/kN4CNN+
Environment
- OS: macOS 12.6
- Slack Client: macOS 4.29.141
11e6574970e522d05bed5fb51aefa9d3ca8abec0@1665605847 (Beta)
Ah, that is frustrating! I can definitely start looking for a fix, we have at least one Mac user I can get to test. Also thank you for reporting! I've done all my testing on Windows clients, but of course there's differences 🙄 .
As a temporary workaround:
- Is it possible to copy "good" quotes and paste them? Like is Slack converting them just when typed from a keyboard, or does it replace from any way they get added?
Potential solution
- Since we can't expect Slack to make any changes to their forms, easiest approach will be to have a small amount of "cleaning" before we check if JSON is valid - we actually already do this for the double quotes
""{{variable}}""
Slack inserts when using variables.
Ah, that is frustrating! Can definitely start looking for a fix, we have at least one Mac user I can get to test. Also thank you for reporting! I've done all my testing on Windows clients, but of course there's differences 🙄 .
As a temporary workaround:
- Is it possible to copy "good" quotes and paste them? Like is Slack converting them just when typed from a keyboard, or does it replace from any way they get added?
Unfortunately not :-( I've tried that with my code editor (Nova by Panic and Macromates' Textmate), but it's just converting them as curly. Doesn't matter if I just copy/paste a single selected quote or the complete json command.
You don't see the same behaviour on Slack/Windows? So it's likely not a general Slack thing?
👋 Sorry it auto-close this when I merged my PR - i tested it with:
{“dq”:“Double quote”}
Yeah haven't seen that issue with the Windows client unfortunately.
They seemed like the smart quotes that might be used on Mac. If this didn't fix it, if you could copy paste into your comment the offending characters so I can write tests against them, would be much appreciated.
Thanks! Will keep you updated after you closed #30 since I have no clue how to deploy your fixes to my Fly instance 😜
Lmk if this makes sense! Updating for Fly.
⚠ one unique thing in your case, since I updated the Fly deployment instructions - you'll want to create a fly volume
using the provided commands so your event configuration's persist in between deployments.