diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-08-28 20:54:21 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2022-08-31 16:24:33 +0200 |
commit | a392235e23c3b8af1d0eba4dbac18b18de826a1c (patch) | |
tree | c983c213d99937bb53463e759d703d85861fb631 /lib/public/IURLGenerator.php | |
parent | bee8fd2408b053756e052a2b96899935c1adf872 (diff) | |
download | nextcloud-server-a392235e23c3b8af1d0eba4dbac18b18de826a1c.tar.gz nextcloud-server-a392235e23c3b8af1d0eba4dbac18b18de826a1c.zip |
Cleanup
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/public/IURLGenerator.php')
-rw-r--r-- | lib/public/IURLGenerator.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/public/IURLGenerator.php b/lib/public/IURLGenerator.php index 580536b8b5f..808ba66c862 100644 --- a/lib/public/IURLGenerator.php +++ b/lib/public/IURLGenerator.php @@ -35,6 +35,16 @@ namespace OCP; * @since 6.0.0 */ interface IURLGenerator { + + /** + * Regex for matching http(s) urls + * + * This is a copy of the frontend regex in core/src/OCP/comments.js, make sure to adjust both when changing + * + * @since 25.0.0 + */ + public const URL_REGEX = '/(\s|\n|^)(https?:\/\/)?((?:[-A-Z0-9+_]+\.)+[-A-Z]+(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|\n|$)/mi'; + /** * Returns the URL for a route * @param string $routeName the name of the route |