public function replaceAbsoluteUrls($currentHost = true)
    {
        $hosts = array();

        if ($currentHost === true)
        {
            $hosts[] = $_SERVER["HTTP_HOST"];
        }
        elseif (is_array($currentHost))
        {
            foreach ($currentHost as $h)
            {
                $hosts[] = $h;
            }
        }

        foreach ($hosts as $h)
        {
            $this->filteredHtml = preg_replace("/=([\"'])((http[s]?:\/\/)?".$h.")/usi", '=$1', $this->filteredHtml);
        }
        
        return $this;
    }
public function replaceAbsoluteUrls($currentHost = true)
    {
        $hosts = array();

        if ($currentHost === true)
        {
            $hosts[] = $_SERVER["HTTP_HOST"];
        }
        elseif (is_array($currentHost))
        {
            foreach ($currentHost as $h)
            {
                $hosts[] = $h;
            }
        }

        foreach ($hosts as $h)
        {
            $this->filteredHtml = preg_replace("/=([\"'])((http[s]?:\/\/)?".$h.")/usi", '=$1', $this->filteredHtml);
        }
        
        return $this;
    }
public function replaceAbsoluteUrls ( $ currentHost = true ) { $ hosts = array ( ) ; if ( $ currentHost === true ) { $ hosts [ ] = $ _SERVER [ "HTTP_HOST" ] ; } elseif ( is_array ( $ currentHost ) ) { foreach ( $ currentHost as $ h ) { $ hosts [ ] = $ h ; } } foreach ( $ hosts as $ h ) { $ this -> filteredHtml = preg_replace ( "/=([\"'])((http[s]?:\/\/)?" . $ h . ")/usi" , '=$1' , $ this -> filteredHtml ) ; } return $ this ; }
Replace absolute urls with relative path
@return Hups\Util\HTMLCompressor
Replace absolute urls with relative path