From c1c44db931f30e8f66b5ed7a19e8f5fabf18bf5c Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 31 Dec 2021 03:23:32 +0200 Subject: [PATCH] make mentions clickable --- src/system/helper/format.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/system/helper/format.php b/src/system/helper/format.php index bc673ad..b78fe98 100644 --- a/src/system/helper/format.php +++ b/src/system/helper/format.php @@ -48,6 +48,7 @@ class Format { public static function post(string $text) { + $text = preg_replace("|@([a-zA-Z0-9_]+)|i", "@$1", $text); $text = preg_replace("|((https?://)?([\d\w\.-]+\.[\w\.]{2,6})[^\s\]\[\<\>]*/?)|i", "$3", $text); $text = nl2br($text);