planetscale / beam

A simple message board for your organization or project

Home Page:https://planetscale.com/blog/introducing-beam

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

piki opened this issue · comments

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.

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