From 22fe7b36103e1fb344a4eddf44bbb635e83c2816 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 1 Jan 2022 05:39:40 +0200 Subject: [PATCH] fix link replacement --- src/system/helper/format.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/helper/format.php b/src/system/helper/format.php index 96fd4a3..8ef5b88 100644 --- a/src/system/helper/format.php +++ b/src/system/helper/format.php @@ -49,7 +49,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 = preg_replace("|((https?://)+([\d\w\.-]+\.[\w\.]{2,6})[^\s\]\[\<\>]*/?)|i", "$3", $text); $text = nl2br($text); return $text;