From f2dbd1599c439c25d9bd6d108f4c7f1bf54aab18 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 22 Mar 2024 03:02:57 +0200 Subject: [PATCH] fix tags replacement condition --- src/cli/document/crawl.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cli/document/crawl.php b/src/cli/document/crawl.php index f70a032..9989b95 100644 --- a/src/cli/document/crawl.php +++ b/src/cli/document/crawl.php @@ -388,10 +388,10 @@ foreach($index->search('') ], preg_replace( [ - '/]*)>([^<]*)<\/script>/is', // strip js content - '/]*)>([^<]*)<\/style>/is', // strip css content - '/]*)>([^<]*)<\/pre>/is', // strip code content - '/]*)>([^<]*)<\/code>/is', + '/]*)>([\s\S]*?)<\/script>/i', // strip js content + '/]*)>([\s\S]*?)<\/style>/i', // strip css content + '/]*)>([\s\S]*?)<\/pre>/i', // strip code content + '/]*)>([\s\S]*?)<\/code>/i', ], '', html_entity_decode(