Move base_url parsing to print results

This commit is contained in:
davidovski 2023-09-06 12:23:59 +01:00
parent c70436b257
commit fa07f21f56
5 changed files with 6 additions and 2 deletions

View File

@ -23,6 +23,7 @@
array (
"title" => $title ? htmlspecialchars($title) : "No description provided",
"url" => htmlspecialchars($url),
// base_url is to be removed in the future, see #47
"base_url" => htmlspecialchars(get_base_url($url)),
"description" => htmlspecialchars($description)
)

View File

@ -23,6 +23,7 @@
array (
"title" => htmlspecialchars($title),
"url" => htmlspecialchars($url),
// base_url is to be removed in the future, see #47
"base_url" => htmlspecialchars(get_base_url($url)),
"uploader" => htmlspecialchars($uploader),
"views" => htmlspecialchars($views),
@ -43,7 +44,7 @@
$title = $result["title"];
$url = $result["url"];
$url = check_for_privacy_frontend($url, $opts);
$base_url = $result["base_url"];
$base_url = get_base_url($url);
$uploader = $result["uploader"];
$views = $result["views"];
$date = $result["date"];

View File

@ -50,6 +50,7 @@
array (
"title" => htmlspecialchars($title->textContent),
"url" => htmlspecialchars($url),
// base_url is to be removed in the future, see #47
"base_url" => htmlspecialchars(get_base_url($url)),
"description" => $description == null ?
"No description was provided for this site." :

View File

@ -61,6 +61,7 @@
array (
"title" => htmlspecialchars($title->textContent),
"url" => htmlspecialchars($url),
// base_url is to be removed in the future, see #47
"base_url" => htmlspecialchars(get_base_url($url)),
"description" => $description == null ?
"No description was provided for this site." :

View File

@ -104,7 +104,7 @@
$url = $result["url"];
$url = check_for_privacy_frontend($url, $opts);
$base_url = $result["base_url"];
$base_url = get_base_url($url);
$description = $result["description"];
echo "<div class=\"text-result-wrapper\">";