mirror of
https://github.com/friendica/friendica
synced 2025-05-05 17:44:10 +02:00
Issue #14079: Shorten the displayed URL
This commit is contained in:
parent
ce580241e2
commit
7dc5622dca
3 changed files with 67 additions and 92 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue