Our application generates a json payload to submit to the Zoom Chats API for an integration with Zoom Team Chat. In this payload, we are sending a link to the Incoming Webhook using the link format found in Markdown syntax for Zoom <https://example.link/foo/bar/blah#blah|Click here>. What we are finding is that the fragment identifier gets encoded to %23 so when the URL is clicked, we aren’t able to direct the user to the location required.
If I send the link by itself, it works fine and I’m able to navigate to the correct location. Is there the hashtag is encoded out? Is there another way I can solve this issue without displaying the long URL like inline html for an tag? I appreciate any suggestions.
The issue you are facing with the fragment identifier being encoded to %23 in the Zoom Chats API payload is likely due to the API’s handling of special characters. To solve this problem, you can try using HTML entities for the hashtag symbol (#) instead of the direct character.
Instead of using <https://example.link/foo/bar/blah#blah|Click 2 here>
, you can use the HTML entity #
for the hashtag like this: <https://resizeimageto50kb.com/>
.
When you include the link within angle brackets (< >), it’s treated as a complete URL, and the fragment identifier “#” is encoded to “%23.”
To avoid this issue while still displaying a user-friendly link, you can try the following approaches:
- Use HTML Entity: Instead of including the link in angle brackets, you can use HTML entities to represent the special characters. For example, you can use “<” for “<” and “>” for “>.” Your link would look like this:
<a href="https://example.link/foo/bar/blah#blah">Click here</a>
. This way, the fragment identifier won’t be encoded.
- Shorten the Display Text: If displaying the full URL is a concern, you can shorten the display text while keeping the full URL intact. For example:
[Click here](https://example.link/foo/bar/blah#blah)
.