Merge pull request #143 from maxiaozhi/patch-1

Fix the matching exception
This commit is contained in:
Jaeger(黄杰)
2021-07-05 14:07:58 +08:00
committed by GitHub

View File

@@ -125,7 +125,7 @@ class Query
*/
public function removeHead()
{
$html = preg_replace('/<head.+?>.+<\/head>/is', '<head></head>', $this->html);
$html = preg_replace('/(<head>|<head\s+.+?>).+<\/head>/is', '<head></head>', $this->html);
$this->setHtml($html);
return $this->ql;
}