planetscale/beam

Single, double quotes, and profile links are displayed badly in Slack messages

piki opened this issue · 2 comments

piki commented

When Beam posts to Slack, single quotes are displayed as &#39;, double quotes are displayed as &quot;, and links to a user's profile are displayed in <> angle brackets. All of these display fine on Beam web pages.
Screen Shot 2022-10-18 at 2 01 06 PM

Screen Shot 2022-10-18 at 2 02 12 PM

Looks like something is getting lost in the SQL -> markdown -> blocks -> POST pipeline.

jgreet commented

Slack wants you to escape specific controls characters, &, <, and >:

https://api.slack.com/reference/surfaces/formatting#escaping

But markdownToBlocks from mack seems to HTML entity-encode more than just those three. Didn't see an option to disable that behavior.

Fixed the quotes. Profile links are probably still broken. We will see.

Closing this because it will feel satisfying