X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FProxy.php;h=be70077f15d98b7eb4d14d40a7c71db193a2f4d3;hb=034d0f650b9b239965e29657502c9e64bb25b96a;hp=0bb7537f78bda42a52edb9535d43a4eea453ab7a;hpb=5a02e39a65f8f685440228cc1d36738cbe15f32b;p=friendica.git diff --git a/src/Util/Proxy.php b/src/Util/Proxy.php index 0bb7537f78..be70077f15 100644 --- a/src/Util/Proxy.php +++ b/src/Util/Proxy.php @@ -6,8 +6,7 @@ use Friendica\BaseModule; use Friendica\BaseObject; use Friendica\Core\Config; use Friendica\Core\System; - -require_once 'include/security.php'; +use Friendica\Util\Strings; /** * @brief Proxy utilities class @@ -78,7 +77,7 @@ class Proxy // Only continue if it isn't a local image and the isn't deactivated if (self::isLocalImage($url)) { - $url = str_replace(normalise_link(System::baseUrl()) . '/', System::baseUrl() . '/', $url); + $url = str_replace(Strings::normaliseLink(System::baseUrl()) . '/', System::baseUrl() . '/', $url); return $url; } @@ -142,7 +141,7 @@ class Proxy */ public static function proxifyHtml($html) { - $html = str_replace(normalise_link(System::baseUrl()) . '/', System::baseUrl() . '/', $html); + $html = str_replace(Strings::normaliseLink(System::baseUrl()) . '/', System::baseUrl() . '/', $html); return preg_replace_callback('/(]*src *= *["\'])([^"\']+)(["\'][^>]*>)/siU', 'self::replaceUrl', $html); } @@ -164,8 +163,8 @@ class Proxy } // links normalised - bug #431 - $baseurl = normalise_link(System::baseUrl()); - $url = normalise_link($url); + $baseurl = Strings::normaliseLink(System::baseUrl()); + $url = Strings::normaliseLink($url); return (substr($url, 0, strlen($baseurl)) == $baseurl); }