From 9358c332044e97ce97f8fe450c0bf3d23bd63819 Mon Sep 17 00:00:00 2001 From: James Cocker Date: Fri, 12 Feb 2021 15:50:22 +0000 Subject: [PATCH] Fixed NoWWW() to stop it removing first 'w' of domain --- src/ExternalURL.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ExternalURL.php b/src/ExternalURL.php index 61fe194..6d31f14 100644 --- a/src/ExternalURL.php +++ b/src/ExternalURL.php @@ -50,7 +50,7 @@ public function Domain() */ public function NoWWW() { - return ltrim($this->value, "www."); + return preg_replace('#^www\.(.+\.)#i', '$1', $this->value); } /**