[themes] don't force http:// upon file:// sources in themes, fixes #1015
This commit is contained in:
parent
2a561392d0
commit
71474142ac
3 changed files with 3 additions and 12 deletions
|
@ -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>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue