slack-php icon indicating copy to clipboard operation
slack-php copied to clipboard

URLs not populating properly

Open twhiting9275 opened this issue 3 years ago • 2 comments

No matter how hard I try, URLs are not being handled properly Example: "text" => 'Check out the <https://api.slack.com|Slack API>', SHOULD produce Check out the Slack API, with slack API being a hyperlink Instead, it shows Check out the <https://api.slack.com|Slack API> I have run this exact same code through the API itself and it works as expected (showing Slack API as a hyperlink) However, with this code, it does not

twhiting9275 avatar Sep 17 '21 04:09 twhiting9275

Slack docs say less-than sign & greater-than sign need to be escaped.

Replace the less-than sign, < with \&lt; Replace the greater-than sign, > with &gt;

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

Can you try with escaped characters.

palanik avatar Sep 17 '21 17:09 palanik

#1: The example I used is literally directly out of their website, text and all. #2: I've been using the API via CURL for years, using that exact format https://www.site.com|referencer and it works #3: No, the suggested method do not work. They merely return

Check out the &lt;https://api.slack.com | Slack API&gt;

There's something wonky with how this is interfacing with the slack API, causing this disruption. I'm not sure what. Oddly enough, all the other mrkdwn stuff is fine

twhiting9275 avatar Sep 18 '21 03:09 twhiting9275