]> git.mxchange.org Git - friendica.git/blobdiff - include/network.php
update smarty templates
[friendica.git] / include / network.php
index edd03d557acc2bb28066dab678e71cf1c671ade7..f6e6cc2a30825c189ab77f196f0780b39ac80586 100644 (file)
@@ -15,6 +15,9 @@ function fetch_url($url,$binary = false, &$redirects = 0, $timeout = 0, $accept_
 
        @curl_setopt($ch, CURLOPT_HEADER, true);
 
+       @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
+       @curl_setopt($ch, CURLOPT_MAXREDIRS, 5);
+
        if (!is_null($accept_content)){
                curl_setopt($ch,CURLOPT_HTTPHEADER, array (
                        "Accept: " . $accept_content
@@ -99,7 +102,7 @@ if(! function_exists('post_url')) {
 function post_url($url,$params, $headers = null, &$redirects = 0, $timeout = 0) {
        $a = get_app();
        $ch = curl_init($url);
-       if(($redirects > 8) || (! $ch)) 
+       if(($redirects > 8) || (! $ch))
                return false;
 
        curl_setopt($ch, CURLOPT_HEADER, true);
@@ -854,8 +857,7 @@ function scale_external_images($s, $include_link = true, $scale_replace = false)
        }
 
        // replace the special char encoding
-
-       $s = htmlspecialchars($s,ENT_QUOTES,'UTF-8');
+       $s = htmlspecialchars($s,ENT_NOQUOTES,'UTF-8');
        return $s;
 }