From: Louis Jeckel Date: Mon, 7 Sep 2020 08:14:41 +0000 (+0200) Subject: non greedy title X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c18880d99daf39e3d7bfad3208eb9498794c8e2f;p=psq.git non greedy title --- diff --git a/app/Invokables/GetPageTitleFromUrl.php b/app/Invokables/GetPageTitleFromUrl.php index 479bb9e..33aff91 100644 --- a/app/Invokables/GetPageTitleFromUrl.php +++ b/app/Invokables/GetPageTitleFromUrl.php @@ -34,7 +34,7 @@ class GetPageTitleFromUrl if($str !== ''){ $str = trim(preg_replace('/\s+/', ' ', $str)); // supports line breaks inside - preg_match("/<title>(.*)<\/title>/i",$str,$title); // ignore case + preg_match("/<title>(.*?)<\/title>/i",$str,$title); // ignore case return $title[1] ?? $url; }