diff options
author | provokateurin <kate@provokateurin.de> | 2024-11-16 11:30:14 +0100 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2024-11-16 11:30:14 +0100 |
commit | d23ee9ac9ccbd1701af711b8b8d5b4aeed9f57c8 (patch) | |
tree | aa4902db851dbd43886868381c54cc9a84c77391 | |
parent | 7ffbc81b7f85ff4aec6e9364c0545528ca99726d (diff) | |
download | nextcloud-server-fix/iurlgenerator/url-regex-markdown-parenthesis.tar.gz nextcloud-server-fix/iurlgenerator/url-regex-markdown-parenthesis.zip |
fix(IURLGenerator): Allow markdown parenthesis in URL_REGEX_NO_MODIFIERSfix/iurlgenerator/url-regex-markdown-parenthesis
Signed-off-by: provokateurin <kate@provokateurin.de>
-rw-r--r-- | lib/public/IURLGenerator.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/public/IURLGenerator.php b/lib/public/IURLGenerator.php index a336d18b00f..61c7e0a6b2c 100644 --- a/lib/public/IURLGenerator.php +++ b/lib/public/IURLGenerator.php @@ -30,8 +30,9 @@ interface IURLGenerator { * * @since 25.0.0 * @since 29.0.0 changed to match localhost and hostnames with ports + * @since 31.0.0 changed to match markdown embedded links with parenthesis */ - public const URL_REGEX_NO_MODIFIERS = '(\s|\n|^)(https?:\/\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|\n|$)'; + public const URL_REGEX_NO_MODIFIERS = '(\s|\n|\(|^)(https?:\/\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|\n|\)|$)'; /** * Returns the URL for a route |