From 1d6865444bd55495a7878faf6f1e05ac83c2a012 Mon Sep 17 00:00:00 2001 From: Brett Bieber <brett.bieber@gmail.com> Date: Fri, 12 Aug 2011 18:52:32 +0000 Subject: [PATCH] Do not show local search results for u=http://www.unl.edu/ --- www/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/index.php b/www/index.php index b0afb0c..3a27597 100644 --- a/www/index.php +++ b/www/index.php @@ -28,6 +28,7 @@ if ($template == 'Mobile') { $page->addScript('searchFunc.js'); if (isset($_GET['u']) //u is referring site + && $_GET['u'] !== 'http://www.unl.edu/' && preg_match('/^https?/', $_GET['u']) && filter_var($_GET['u'], FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED) && $scanned = @file_get_contents($_GET['u'])) { @@ -83,7 +84,7 @@ if (isset($_GET['u']) //u is referring site $page->maincontentarea = ' <div id="searchform"> - <form action="http://www1.unl.edu/search/" method="get"> + <form action="./" method="get"> <label for="q">Search</label> <input type="text" name="q" id="q" />'; if (!empty($local_results)) { -- GitLab