diff --git a/app/Models/DashboardModel.php b/app/Models/DashboardModel.php index 2da2320..6489087 100644 --- a/app/Models/DashboardModel.php +++ b/app/Models/DashboardModel.php @@ -171,6 +171,16 @@ class DashboardModel extends Model } } + /** + * Convert line breaks to
s + * + * @return string + */ + public static function lineBreakToBr($string) + { + return preg_replace("/]*>/", "
", str_replace([ "\r\n", "\r", "\n" ], [ "", "", "" ], nl2br($string))); + } + /** * Find the desired image dimensions based on a maximum width and height *