Skip to content

Markdown escaping problem #2260

@michaelkuhn

Description

@michaelkuhn

Description

Escaping short links ([[link]]) does not work at the moment. Even if I type \[\[link\]\], Gitea still converts it into a link.

This is probably due to how Markdown is handled in markdown.go:

result := RenderRaw(rawBytes, urlPrefix, isWikiMarkdown)
result = PostProcess(result, urlPrefix, metas, isWikiMarkdown)

RenderRaw seems to remove the escaping backslashes, PostProcess then only sees a normal short link. Switching the order of the calls is also problematic because PostProcess converts links that it should not (for example, https://pthree.org/2012/04/17/install-zfs-on-debian-gnulinux/ is recognized as an issue link due to the numbers).

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions