mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-01-08 22:07:56 +00:00
trim path levels in the relative links
This commit is contained in:
parent
71a3e7dd0e
commit
b3c668706b
@ -126,7 +126,7 @@ foreach ($db->getCrawlQueue(CRAWL_PAGE_LIMIT, time() - CRAWL_PAGE_SECONDS_OFFSET
|
|||||||
$href = $queueHostPage->scheme . '://' .
|
$href = $queueHostPage->scheme . '://' .
|
||||||
$queueHostPage->name .
|
$queueHostPage->name .
|
||||||
($queueHostPage->port ? ':' . $queueHostPage->port : '') .
|
($queueHostPage->port ? ':' . $queueHostPage->port : '') .
|
||||||
'/' . ltrim($href, '/');
|
'/' . ltrim(str_replace(['./', '../'], '', $href), '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate formatted link
|
// Validate formatted link
|
||||||
|
Loading…
Reference in New Issue
Block a user