Issue #14079: Shorten the displayed URL

This commit is contained in:
Michael 2024-04-07 08:26:15 +00:00
parent ce580241e2
commit 7dc5622dca
3 changed files with 67 additions and 92 deletions

View file

@ -569,6 +569,10 @@ class Strings
public static function getStyledURL(string $url): string
{
$parts = parse_url($url);
if (empty($parts['scheme'])) {
return $url;
}
$scheme = [$parts['scheme'] . '://www.', $parts['scheme'] . '://'];
$styled_url = str_replace($scheme, '', $url);