fix(IURLGenerator): Allow markdown parenthesis in URL_REGEX_NO_MODIFIERS

Signed-off-by: provokateurin <kate@provokateurin.de>
This commit is contained in:
provokateurin 2024-11-16 11:30:14 +01:00
parent 7ffbc81b7f
commit d23ee9ac9c
No known key found for this signature in database

View file

@ -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