original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Replace absolute urls with relative path
  @return Hups\Util\HTMLCompressor
docstring_tokens: Replace absolute urls with relative path