Merge pull request #44023 from nextcloud/chore/document_url_regex_changes

chore(IURLGenerater): Document changes to `URL_REGEX_NO_MODIFIERS`
pull/44000/head
Joas Schilling 3 months ago committed by GitHub
commit 5f514c6ff8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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|$)';

Loading…
Cancel
Save