-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Markdown links with parentheses are not rendered correctly #13149
Description
Description:
Steps to reproduce:
Open a chat window and write the following text:
[Disambiguation](https://en.wikipedia.org/wiki/Disambiguation_(disambiguation))
Expected behavior:
Link should be rendered correctly and link to correct page. In github / VSCode / stackoverflow it works. See how github renders it: Disambiguation
Actual behavior:
Link is rendered wrongly: Disambiguation) . Only the Disambiguation is clickable and when clicked it links to this page: https://en.wikipedia.org/wiki/Disambiguation_(disambiguation which obviously does not exist, because the last parenthesis is missing.
There is also another strange behavior, probably related to the issue. If I just paste the link without markdown, the rendered link that appears below (with the site's title) is correct. If I then edit it and replace it with the markdown version, the rendered link now becomes: https://en.wikipedia.org/wiki/Disambiguation_
The only thing that works is creating a link like this:
[Disambiguation](https://en.wikipedia.org/wiki/Disambiguation_%28disambiguation%29)
Server Setup Information:
- Version of Rocket.Chat Server: version currently installed on: https://open.rocket.chat
- Operating System:
- Deployment Method:
- Number of Running Instances:
- DB Replicaset Oplog:
- NodeJS Version:
- MongoDB Version: