[themes] don't force http:// upon file:// sources in themes, fixes #1015

This commit is contained in:
Shish 2024-01-19 11:10:54 +00:00
parent 2a561392d0
commit 71474142ac
3 changed files with 3 additions and 12 deletions

View file

@ -43,10 +43,7 @@ class CustomViewPostTheme extends ViewPostTheme
} }
if (!is_null($image->source)) { if (!is_null($image->source)) {
$h_source = html_escape($image->source); $h_source = html_escape(make_http($image->source));
if (substr($image->source, 0, 7) != "http://" && substr($image->source, 0, 8) != "https://") {
$h_source = "http://" . $h_source;
}
$html .= "<br>Source: <a href='$h_source'>link</a>"; $html .= "<br>Source: <a href='$h_source'>link</a>";
} }

View file

@ -44,10 +44,7 @@ class CustomViewPostTheme extends ViewPostTheme
if (!is_null($image->source)) { if (!is_null($image->source)) {
$h_source = html_escape($image->source); $h_source = html_escape(make_http($image->source));
if (substr($image->source, 0, 7) != "http://" && substr($image->source, 0, 8) != "https://") {
$h_source = "http://" . $h_source;
}
$html .= "<br>Source: <a href='$h_source'>link</a>"; $html .= "<br>Source: <a href='$h_source'>link</a>";
} }

View file

@ -48,10 +48,7 @@ class CustomViewPostTheme extends ViewPostTheme
if (!is_null($image->source)) { if (!is_null($image->source)) {
$h_source = html_escape($image->source); $h_source = html_escape(make_http($image->source));
if (substr($image->source, 0, 7) != "http://" && substr($image->source, 0, 8) != "https://") {
$h_source = "http://" . $h_source;
}
$html .= "<br>Source: <a href='$h_source'>link</a>"; $html .= "<br>Source: <a href='$h_source'>link</a>";
} }