From 11c71fb05a3115f470230de9a5fb88fac1385010 Mon Sep 17 00:00:00 2001
From: Malfurious <m@lfurio.us>
Date: Tue, 19 Oct 2021 19:40:39 -0400
Subject: Enable greentext in issue messages

Signed-off-by: Malfurious <m@lfurio.us>
---
 app/class/mesg.class.php | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'app/class')

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(" ", "&nbsp;", $this->mesg));
+            $mesg = preg_replace('/^(\s*&gt;.*)$/m', '<span class="text-success">${1}</span>', $mesg);
+        }
 
-        return nl2br(str_replace(" ", "&nbsp;", $mesg));
+        return $mesg;
     }
 
     /*
-- 
cgit v1.2.3