From 0484d434824d8fad9d8884eeb01b58e76f34e49c Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 8 Apr 2023 23:52:46 +0300 Subject: [PATCH] fix trim path levels in the relative links --- crontab/crawler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crontab/crawler.php b/crontab/crawler.php index b6a9e43..ffdd272 100644 --- a/crontab/crawler.php +++ b/crontab/crawler.php @@ -126,7 +126,7 @@ foreach ($db->getCrawlQueue(CRAWL_PAGE_LIMIT, time() - CRAWL_PAGE_SECONDS_OFFSET $href = $queueHostPage->scheme . '://' . $queueHostPage->name . ($queueHostPage->port ? ':' . $queueHostPage->port : '') . - '/' . ltrim(str_replace(['./', '../'], '', $href), '/'); + '/' . trim(ltrim(str_replace(['./', '../'], '', $href), '/'), '.'); } // Validate formatted link