mirror of
https://github.com/Ahwxorg/librey/
synced 2024-12-06 19:16:48 +01:00
use noreferer and noopener for anchors
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
$thumbnail = preg_replace('/(?:https?:\/\/)?(?:www\.)?youtube\.com\/watch\?v=([^\s]+)/', 'https://i.ytimg.com/vi/$1/maxresdefault.jpg', $url) ?? '';
|
||||
|
||||
echo "<div class=\"text-result-wrapper\">";
|
||||
echo "<a href=\"$url\">";
|
||||
echo "<a rel=\"noreferer noopener\" href=\"$url\">";
|
||||
echo "$base_url";
|
||||
echo "<h2>$title</h2>";
|
||||
echo "<img class=\"video-img\" src=\"image_proxy.php?url=$thumbnail\">";
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
$url = $result["url"];
|
||||
$url = check_for_privacy_frontend($url, $opts);
|
||||
|
||||
echo "<a title=\"$alt\" href=\"$url\" target=\"_blank\">";
|
||||
echo "<a title=\"$alt\" href=\"$url\" rel=\"noreferer noopener\" target=\"_blank\">";
|
||||
echo "<img src=\"image_proxy.php?url=$thumbnail\">";
|
||||
echo "</a>";
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
echo $response;
|
||||
if ($source) {
|
||||
$source = check_for_privacy_frontend($source, $opts);
|
||||
echo "<a href=\"$source\" target=\"_blank\">$source</a>";
|
||||
echo "<a href=\"$source\" rel=\"noreferer noopener\" target=\"_blank\">$source</a>";
|
||||
}
|
||||
echo "</p>";
|
||||
}
|
||||
@@ -175,7 +175,7 @@
|
||||
$description = $result["description"];
|
||||
|
||||
echo "<div class=\"text-result-wrapper\">";
|
||||
echo "<a href=\"$url\">";
|
||||
echo "<a rel=\"noreferer noopener\" href=\"$url\">";
|
||||
echo "$base_url";
|
||||
echo "<h2>$title</h2>";
|
||||
echo "</a>";
|
||||
|
||||
Reference in New Issue
Block a user