From 8941fc760e0f5fc0621cbd5dc9bd5efdd54f651a Mon Sep 17 00:00:00 2001 From: Jonas Siewertsen Date: Sun, 8 Aug 2021 22:20:31 +0200 Subject: [PATCH] Return false in case the url is empty. --- src/ExternalLink.php | 70 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/src/ExternalLink.php b/src/ExternalLink.php index 10c57e2..e054d7f 100644 --- a/src/ExternalLink.php +++ b/src/ExternalLink.php @@ -46,4 +46,74 @@ public function preProcess($data) { return preg_replace('/^(http|https):\/\//i', '', $data); } + + regexPattern, '', $data); + } + + /** + * Augment the value, which will return false in + * case it only contains the https prefix. + * + * @param $value + * + * @return mixed + */ + public function augment($value) + { + if ($value === 'https://') { + return false; + } + + return $value; + } +} + }