Skip to content

Markdown links with parentheses are not rendered correctly #13149

@ghuser

Description

@ghuser

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:

Additional context

Relevant logs:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions