summaryrefslogtreecommitdiff
path: root/lib/frontend.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/frontend.php')
-rw-r--r--lib/frontend.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/frontend.php b/lib/frontend.php
index 3be912b..e03eb1d 100644
--- a/lib/frontend.php
+++ b/lib/frontend.php
@@ -143,7 +143,7 @@ class frontend{
$payload .=
'">' .
- '<img class="thumb" src="/proxy?i=' . urlencode($site["thumb"]["url"]) . '&s=' . $size . '" alt="thumb">';
+ '<img class="thumb" src="' . $this->htmlimage($site["thumb"]["url"], $size) . '" alt="thumb">';
if($duration !== null){
@@ -1273,6 +1273,21 @@ class frontend{
return http_build_query($out);
}
+ public function htmlimage($image, $format){
+
+ if(
+ preg_match(
+ '/^data:/',
+ $image
+ )
+ ){
+
+ return htmlspecialchars($image);
+ }
+
+ return "/proxy.php?i=" . urlencode($image) . "&s=" . $format;
+ }
+
public function htmlnextpage($gets, $npt, $page){
$query = $this->buildquery($gets);