jae-jae / QueryList

:spider: The progressive PHP crawler framework! 优雅的渐进式PHP采集框架。
https://querylist.cc
2.65k stars 441 forks source link

removehead 功能有可能导致html被清空 #17

Closed LiuHD closed 3 years ago

LiuHD commented 6 years ago
public function removeHead()
    {
        $html = preg_replace('/<head.+?>.+<\/head>/is','<head></head>',$this->html);
        $this->setHtml($html);
        return $this->ql;
    }

如题,在字符串较长时,preg_replace返回为空 可能是由于pcre.backtrack_limit 限制的问题