Inline link with nested parentheses does not work

Summary

Posting an inline link with nested parentheses in the URL does not work.

Steps to reproduce

Mattermost 5.6, any client.
Post this message:

how about: [hmm](https://somewhere?param=(currentUser()))?

Expected behavior

Expect inline link with title hmm and URL https://somewhere?param=(currentUser())

Observed behavior

No inline link. The original markdown syntax appears directly. However, part of the URL (https://somewhere?param=) is then detected as an auto link and becomes clickable.

For reference purposes, this is how it looks like on Mattermost 5.7 on my end:
20

Came across this which could be related - URLs are not URL-encoded breaking the markdown rendering in Mattermost.

Opened a ticket here: https://mattermost.atlassian.net/browse/MM-14040.

1 Like

@gubbins can we ask where you are getting such links with nested parentheses?

JIRA uses them, e.g. https://jira/browse/ABC-123?jql=assignee%20in%20(currentUser()). We’ve also seen this with some TeamCity locators I think.