From 213adb1ee75ca225c49742100f1d2b76d1540334 Mon Sep 17 00:00:00 2001 From: Dominik Pfennig <dominik@suma-ev.de> Date: Mon, 1 Aug 2016 13:18:19 +0200 Subject: [PATCH] Sitesearch Link ist nun Klickbar --- app/MetaGer.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/MetaGer.php b/app/MetaGer.php index 11b94096d..678bf4af4 100644 --- a/app/MetaGer.php +++ b/app/MetaGer.php @@ -398,7 +398,7 @@ class MetaGer $siteSearchFailed = true; }else { - $this->warnings[] = "Sie führen eine Sitesearch durch. Es werden nur Ergebnisse von der Seite: <a href=\"http://www." . $this->site . "\">\"" . $this->site . "\"</a> angezeigt."; + $this->warnings[] = "Sie führen eine Sitesearch durch. Es werden nur Ergebnisse von der Seite: <a href=\"http://" . $this->site . "\" target=\"_blank\">\"" . $this->site . "\"</a> angezeigt."; } } @@ -634,9 +634,7 @@ class MetaGer public function checkSpecialSearches (Request $request) { # Site Search: - # (.*)\bsite:(?:http:\/\/)?(?:www\.)?(\S+)(.*) - # gibt als Seite nur den Teil nach eventuellem "Http://" und "www." aus. - if(preg_match("/(.*)\bsite:(?:http:\/\/)?(?:www\.)?(\S+)(.*)/si", $this->q, $match)) + if(preg_match("/(.*)\bsite:(\S+)(.*)/si", $this->q, $match)) { $this->site = $match[2]; $this->q = $match[1] . $match[3]; -- GitLab