diff options
author | Jonas <jonas@freesources.org> | 2024-03-06 11:29:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 11:29:28 +0100 |
commit | 782f8082287c54bc6f9446b0d450f63256929961 (patch) | |
tree | 8a846900855d5405f6d766c71c9e8acd372b7a92 /core/src | |
parent | 0a64b69ab8e9b4350a40a03ee1b971a093417498 (diff) | |
parent | ea7a69579de0a90e09e2db4213fb2c3446bbaec9 (diff) | |
download | nextcloud-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.js | 2 |
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 - |