fix trim path levels in the relative links

This commit is contained in:
ghost 2023-04-08 23:52:46 +03:00
parent b819fda025
commit 0484d43482

View File

@ -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