mirror of
https://github.com/nextcloud/server.git
synced 2026-02-12 07:14:44 -05:00
Only match http(s) URLs for references
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
ce1dddcc64
commit
019ffa2ec0
4 changed files with 5 additions and 5 deletions
|
|
@ -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+_]+\.)+[-A-Z]+(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|$)/ig
|
||||
|
||||
/**
|
||||
* @param {any} content -
|
||||
|
|
|
|||
4
dist/core-main.js
vendored
4
dist/core-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-main.js.map
vendored
2
dist/core-main.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -43,7 +43,7 @@ interface IURLGenerator {
|
|||
*
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public const URL_REGEX = '/(\s|\n|^)(https?:\/\/)?((?:[-A-Z0-9+_]+\.)+[-A-Z]+(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|\n|$)/mi';
|
||||
public const URL_REGEX = '/(\s|\n|^)(https?:\/\/)((?:[-A-Z0-9+_]+\.)+[-A-Z]+(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|\n|$)/mi';
|
||||
|
||||
/**
|
||||
* Returns the URL for a route
|
||||
|
|
|
|||
Loading…
Reference in a new issue