private relativeToAbsolute ( string $html ) : string | ||
$html | string | The html to convert links in. |
return | string |
private function relativeToAbsolute($html)
{
// replace internal links/images
$search = array('href="/', 'src="/');
$replace = array('href="' . SITE_URL . '/', 'src="' . SITE_URL . '/');
return str_replace($search, $replace, $html);
}