From 11c71fb05a3115f470230de9a5fb88fac1385010 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Tue, 19 Oct 2021 19:40:39 -0400 Subject: Enable greentext in issue messages Signed-off-by: Malfurious --- app/class/mesg.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/class/mesg.class.php b/app/class/mesg.class.php index 365431c..2104519 100644 --- a/app/class/mesg.class.php +++ b/app/class/mesg.class.php @@ -221,11 +221,16 @@ class mesg extends obj public function renderMesg() : string { if ($this->objtype == "log") + { $mesg = sprintf($this->mesg, $this->getAuthor()->getDisplayName()); + } else - $mesg = $this->mesg; + { + $mesg = nl2br(str_replace(" ", " ", $this->mesg)); + $mesg = preg_replace('/^(\s*>.*)$/m', '${1}', $mesg); + } - return nl2br(str_replace(" ", " ", $mesg)); + return $mesg; } /* -- cgit v1.2.3