aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRedMatrix <info@friendica.com>2015-01-25 17:13:11 +1100
committerRedMatrix <info@friendica.com>2015-01-25 17:13:11 +1100
commitdfc6126a65443567c74bb4568e0a32e8248eda80 (patch)
treebbc71f28f95623ac3a6ca8d81864d57be20aaac3 /include
parent776557cb88438bf7268e67e56797da834efaefdf (diff)
parent2e783dbe79be9db8f88dde092daa33592c1e3672 (diff)
downloadvolse-hubzilla-dfc6126a65443567c74bb4568e0a32e8248eda80.tar.gz
volse-hubzilla-dfc6126a65443567c74bb4568e0a32e8248eda80.tar.bz2
volse-hubzilla-dfc6126a65443567c74bb4568e0a32e8248eda80.zip
Merge pull request #877 from solstag/master
Call sslify with an extra path element so files keep their names
Diffstat (limited to 'include')
-rw-r--r--include/text.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/text.php b/include/text.php
index b6e4abf24..47694a17c 100644
--- a/include/text.php
+++ b/include/text.php
@@ -898,7 +898,8 @@ function sslify($s) {
$cnt = preg_match_all("/\<(.*?)src=\"(http\:.*?)\"(.*?)\>/",$s,$matches,PREG_SET_ORDER);
if($cnt) {
foreach($matches as $match) {
- $s = str_replace($match[2],z_root() . '/sslify?f=&url=' . urlencode($match[2]),$s);
+ $filename = basename( parse_url($match[2],PHP_URL_PATH) );
+ $s = str_replace($match[2],z_root() . '/sslify/' . $filename . '?f=&url=' . urlencode($match[2]),$s);
}
}
return $s;