|
|
@ -48,6 +48,7 @@ class Format { |
|
|
|
|
|
|
|
|
|
|
|
public static function post(string $text) { |
|
|
|
public static function post(string $text) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$text = preg_replace("|@([a-zA-Z0-9_]+)|i", "<a href=\"follow/$1\">@$1</a>", $text); |
|
|
|
$text = preg_replace("|((https?://)?([\d\w\.-]+\.[\w\.]{2,6})[^\s\]\[\<\>]*/?)|i", "<a href=\"$1\" target=\"_blank\">$3</a>", $text); |
|
|
|
$text = preg_replace("|((https?://)?([\d\w\.-]+\.[\w\.]{2,6})[^\s\]\[\<\>]*/?)|i", "<a href=\"$1\" target=\"_blank\">$3</a>", $text); |
|
|
|
$text = nl2br($text); |
|
|
|
$text = nl2br($text); |
|
|
|
|
|
|
|
|
|
|
|