mirror of https://github.com/nextcloud/bookmarks
Flow: Fix URL regex
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
a70adb47a6
commit
ddeb5fc953
|
@ -28,7 +28,7 @@ use OCP\WorkflowEngine\IOperation;
|
|||
use OCP\WorkflowEngine\IRuleMatcher;
|
||||
|
||||
class CreateBookmark implements IOperation {
|
||||
private const REGEX_URL = "%^(?:(?:https?|ftp)://)(?:\S+(?::\S*)?@|\d{1,3}(?:\.\d{1,3}){3}|(?:(?:[a-z\d\x{00a1}-\x{ffff}]+-?)*[a-z\d\x{00a1}-\x{ffff}]+)(?:\.(?:[a-z\d\x{00a1}-\x{ffff}]+-?)*[a-z\d\x{00a1}-\x{ffff}]+)*(?:\.[a-z\x{00a1}-\x{ffff}]{2,6}))(?::\d+)?(?:[^\s]*)?$%ium";
|
||||
private const REGEX_URL = "%(https?|ftp)://(\S+(:\S*)?@|\d{1,3}(\.\d{1,3}){3}|(([a-z\d\x{00a1}-\x{ffff}]+-?)*[a-z\d\x{00a1}-\x{ffff}]+)(\.([a-z\d\x{00a1}-\x{ffff}]+-?)*[a-z\d\x{00a1}-\x{ffff}]+)*(\.[a-z\x{00a1}-\x{ffff}]{2,6}))(:\d+)?([^\s]*)?%ium";
|
||||
|
||||
/**
|
||||
* @var IL10N
|
||||
|
|
Loading…
Reference in New Issue