From e96fa8ce72c667c349eaf02a9cce465494e395ae Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 29 Apr 2018 10:26:58 -0600 Subject: [PATCH] Update Nickname lexer --- app/Util/Lexer/Nickname.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Util/Lexer/Nickname.php b/app/Util/Lexer/Nickname.php index 631a1fc8d..4c7124d67 100644 --- a/app/Util/Lexer/Nickname.php +++ b/app/Util/Lexer/Nickname.php @@ -6,6 +6,10 @@ class Nickname { public static function normalizeProfileUrl($url) { + if(starts_with($url, 'acct:')) { + $url = str_replace('acct:', '', $url); + } + if(!str_contains($url, '@') && filter_var($url, FILTER_VALIDATE_URL)) { $parsed = parse_url($url); $username = str_replace(['/','\\','@'], '', $parsed['path']);