diff options
author | Malfurious <m@lfurio.us> | 2021-10-19 19:40:39 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2021-10-19 19:40:39 -0400 |
commit | 11c71fb05a3115f470230de9a5fb88fac1385010 (patch) | |
tree | 3c12dff9fc9a025321d8b9898df2eec796f1d101 /app | |
parent | 2b5ea48b854e4441cc89666d5c1d5fb30f8453ea (diff) | |
download | scrott-11c71fb05a3115f470230de9a5fb88fac1385010.tar.gz scrott-11c71fb05a3115f470230de9a5fb88fac1385010.zip |
Enable greentext in issue messages
Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'app')
-rw-r--r-- | app/class/mesg.class.php | 9 |
1 files 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', '<span class="text-success">${1}</span>', $mesg); + } - return nl2br(str_replace(" ", " ", $mesg)); + return $mesg; } /* |