aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2024-03-06 14:47:40 +0100
committerGitHub <noreply@github.com>2024-03-06 14:47:40 +0100
commit5f514c6ff8207b35850f9d5aabfb0a144d9eec76 (patch)
treebf25f6b242b0abd586d8df08a13d1c79065fc4f0
parentdb12159fb6f85c0365684d856b4586296e11c952 (diff)
parent8e8d26d690aa398fe0e4b05092371e1aca6d4675 (diff)
downloadnextcloud-server-5f514c6ff8207b35850f9d5aabfb0a144d9eec76.tar.gz
nextcloud-server-5f514c6ff8207b35850f9d5aabfb0a144d9eec76.zip
Merge pull request #44023 from nextcloud/chore/document_url_regex_changes
chore(IURLGenerater): Document changes to `URL_REGEX_NO_MODIFIERS`
-rw-r--r--lib/public/IURLGenerator.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/public/IURLGenerator.php b/lib/public/IURLGenerator.php
index 0c7dc070778..396867e22b3 100644
--- a/lib/public/IURLGenerator.php
+++ b/lib/public/IURLGenerator.php
@@ -41,6 +41,7 @@ interface IURLGenerator {
* 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
+ * @since 29.0.0 changed to match localhost and hostnames with ports
*/
public const URL_REGEX = '/' . self::URL_REGEX_NO_MODIFIERS . '/mi';
@@ -50,6 +51,7 @@ interface IURLGenerator {
* 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
+ * @since 29.0.0 changed to match localhost and hostnames with ports
*/
public const URL_REGEX_NO_MODIFIERS = '(\s|\n|^)(https?:\/\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|\n|$)';