diff options
-rwxr-xr-x | include/text.php | 2 | ||||
-rw-r--r-- | mod/sslify.php | 15 | ||||
-rwxr-xr-x | view/tpl/oembed_video.tpl | 6 |
3 files changed, 19 insertions, 4 deletions
diff --git a/include/text.php b/include/text.php index 38f24c6b2..8b71fbddf 100755 --- a/include/text.php +++ b/include/text.php @@ -1195,7 +1195,7 @@ function prepare_body(&$item,$attach = false) { $s .= format_filer($item); -// $s = sslify($s); + $s = sslify($s); // Look for spoiler diff --git a/mod/sslify.php b/mod/sslify.php index 951a201ea..84afec6dc 100644 --- a/mod/sslify.php +++ b/mod/sslify.php @@ -1,6 +1,21 @@ <?php function sslify_init(&$a) { + $x = z_fetch_url($_REQUEST['url']); + if($x['success']) { + $h = explode("\n",$x['headers']); + foreach ($h as $l) { + list($k,$v) = array_map("trim", explode(":", trim($l), 2)); + $hdrs[$k] = $v; + } + if (array_key_exists('Content-Type', $hdrs)) + $type = $hdrs['Content-Type']; + + header('Content-Type: ' . $type); + echo $x['body']; + killme(); + } + goaway($_REQUEST['url']); } diff --git a/view/tpl/oembed_video.tpl b/view/tpl/oembed_video.tpl index 4ad75a82e..b0cfed2e5 100755 --- a/view/tpl/oembed_video.tpl +++ b/view/tpl/oembed_video.tpl @@ -1,4 +1,4 @@ -<a href='{{$embedurl}}' onclick='this.innerHTML=Base64.decode("{{$escapedhtml}}"); return false;' style='float:left; margin: 1em; position: relative;'> - <img width='{{$tw}}' height='{{$th}}' src='{{$turl}}' > - <div style='position: absolute; top: 0px; left: 0px; width: {{$twpx}}; height: {{$thpx}}; background: url({{$baseurl}}/images/icons/48/play.png) no-repeat center center;'></div> +<a href="{{$embedurl}}" onclick="this.innerHTML=Base64.decode('{{$escapedhtml}}'); return false;" style="float:left; margin: 1em; position: relative;"> + <img width="{{$tw}}" height="{{$th}}" src="{{$turl}}" /> + <div style="position: absolute; top: 0px; left: 0px; width: {{$twpx}}; height: {{$thpx}}; background: url({{$baseurl}}/images/icons/48/play.png) no-repeat center center;"></div> </a> |