summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJonas <jonas@freesources.org>2024-03-06 11:29:28 +0100
committerGitHub <noreply@github.com>2024-03-06 11:29:28 +0100
commit782f8082287c54bc6f9446b0d450f63256929961 (patch)
tree8a846900855d5405f6d766c71c9e8acd372b7a92 /core/src
parent0a64b69ab8e9b4350a40a03ee1b971a093417498 (diff)
parentea7a69579de0a90e09e2db4213fb2c3446bbaec9 (diff)
downloadnextcloud-server-782f8082287c54bc6f9446b0d450f63256929961.tar.gz
nextcloud-server-782f8082287c54bc6f9446b0d450f63256929961.zip
Merge pull request #43997 from nextcloud/fix/url_regex
fix: Make URL pattern regexes match localhost and URLs with ports
Diffstat (limited to 'core/src')
-rw-r--r--core/src/OCP/comments.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/OCP/comments.js b/core/src/OCP/comments.js
index cd1e8a8fa77..9e182aeef3e 100644
--- a/core/src/OCP/comments.js
+++ b/core/src/OCP/comments.js
@@ -34,7 +34,7 @@ import $ from 'jquery'
*
* This is a copy of the backend regex in IURLGenerator, make sure to adjust both when changing
*/
-const urlRegex = /(\s|^)(https?:\/\/)((?:[-A-Z0-9+_]+\.)+[-A-Z]+(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|$)/ig
+const urlRegex = /(\s|^)(https?:\/\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|$)/ig
/**
* @param {any} content -