Match mentions later because they are less specific
authorAlexander Ebert <ebert@woltlab.com>
Tue, 24 Aug 2021 21:15:20 +0000 (23:15 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 24 Aug 2021 21:15:20 +0000 (23:15 +0200)
commite0ad957ac46228307c6969ffe2849f22e2f932b8
tree1b1748cea99f3d1dc5a855af9f235f276b0cadaf
parent0f67c239e48b27dae1b365b2d17bdf8d0de4160d
Match mentions later because they are less specific

Parts like `@example` can legitimately appears as part of a link that gets auto-detected.

This issue was discovered when an URL was pasted that happens to also match a user that is named `document`. The "offending" URL was: `https://developer.mozilla.org/de/docs/Web/CSS/@document`

The `@document` is recognized as part of a mention because the forward slash is a valid token that matches the boundary condition (`\b`) of the regex for mentions.

See https://community.woltlab.com/thread/292020-automatische-link-umwandlung-schl%C3%A4gt-fehlt/
wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeTextParser.class.php