src/Control/HTTP.php
public static function absoluteURLs($html)
    {
        $html = str_replace('$CurrentPageURL', Controller::curr()->getRequest()->getURL(), $html);
        return HTTP::urlRewriter($html, function ($url) {
            //no need to rewrite, if uri has a protocol (determined here by existence of reserved URI character ":")
            if (preg_match('/^\w+:/', $url)) {
                return $url;
            }
            return Director::absoluteURL($url, true);
        });
    }
public static function absoluteURLs($html)
    {
        $html = str_replace('$CurrentPageURL', Controller::curr()->getRequest()->getURL(), $html);
        return HTTP::urlRewriter($html, function ($url) {
            //no need to rewrite, if uri has a protocol (determined here by existence of reserved URI character ":")
            if (preg_match('/^\w+:/', $url)) {
                return $url;
            }
            return Director::absoluteURL($url, true);
        });
    }
public static function absoluteURLs ( $ html ) { $ html = str_replace ( '$CurrentPageURL' , Controller :: curr ( ) -> getRequest ( ) -> getURL ( ) , $ html ) ; return HTTP :: urlRewriter ( $ html , function ( $ url ) { //no need to rewrite, if uri has a protocol (determined here by existence of reserved URI character ":") if ( preg_match ( '/^\w+:/' , $ url ) ) { return $ url ; } return Director :: absoluteURL ( $ url , true ) ; } ) ; }
Turn all relative URLs in the content to absolute URLs.

@param string $html

@return string
Turn all relative URLs in the content to absolute URLs .