This commit is contained in:
joyqi 2021-09-07 16:31:06 +08:00
parent ee00fc567f
commit 0759a9414a

View File

@ -138,11 +138,7 @@ namespace Typecho {
public static function url(?string $path, ?string $prefix): string
{
$path = (0 === strpos($path, './')) ? substr($path, 2) : $path;
return rtrim(
rtrim($prefix, '/') . '/'
. str_replace('//', '/', ltrim($path, '/')),
'/'
);
return rtrim($prefix, '/') . '/' . str_replace('//', '/', ltrim($path, '/'));
}
/**