]> git.mxchange.org Git - friendica.git/blobdiff - include/network.php
* Add MIME types for file attachments
[friendica.git] / include / network.php
index 599088a2daeace1ab0e4b37170e8b3c8939011b3..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
@@ -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;
 }