<?php
/**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
use Friendica\Content\Pager;
use Friendica\Content\Text\HTML;
use Friendica\Content\Widget;
-use Friendica\Core\Cache\Duration;
+use Friendica\Core\Cache\Enum\Duration;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Core\Search;
use Friendica\Model\Tag;
use Friendica\Module\BaseSearch;
use Friendica\Network\HTTPException;
-use Friendica\Util\Strings;
class Index extends BaseSearch
{
- public static function content(array $parameters = [])
+ protected function content(array $request = []): string
{
- $search = (!empty($_GET['q']) ? Strings::escapeTags(trim(rawurldecode($_GET['q']))) : '');
+ $search = (!empty($_GET['q']) ? trim(rawurldecode($_GET['q'])) : '');
if (DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) {
throw new HTTPException\ForbiddenException(DI::l10n()->t('Public access denied.'));
$tag = false;
if (!empty($_GET['tag'])) {
$tag = true;
- $search = '#' . Strings::escapeTags(trim(rawurldecode($_GET['tag'])));
+ $search = '#' . trim(rawurldecode($_GET['tag']));
}
// contruct a wrapper for the search header