use Friendica\BaseObject;
use Friendica\Core\Config;
use Friendica\Core\System;
+use Friendica\Util\Strings;
/**
* @brief Proxy utilities class
// 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;
}
*/
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('/(<img [^>]*src *= *["\'])([^"\']+)(["\'][^>]*>)/siU', 'self::replaceUrl', $html);
}
}
// 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);
}