summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2021-09-27 18:39:11 -0400
committerMalfurious <m@lfurio.us>2021-09-27 18:39:11 -0400
commit12c7230cf6bcdd7d38bd5752ed27b10d2c1f177f (patch)
treeea8042d415b3c28a7b5bfc378d4778ada3dfd2da
parentcc292f7a72d10b9c8c6473e3df5729da8185ee5f (diff)
downloadscrott-12c7230cf6bcdd7d38bd5752ed27b10d2c1f177f.tar.gz
scrott-12c7230cf6bcdd7d38bd5752ed27b10d2c1f177f.zip
Preserve whitespace in ticket messages
Signed-off-by: Malfurious <m@lfurio.us>
-rw-r--r--app/class/mesg.class.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/class/mesg.class.php b/app/class/mesg.class.php
index 2e5c9d6..365431c 100644
--- a/app/class/mesg.class.php
+++ b/app/class/mesg.class.php
@@ -216,8 +216,7 @@ class mesg extends obj
}
/*
- * Format message (if auto generated), and insert HTML linebreaks (<br />)
- * at message newlines.
+ * Format message (if auto generated), and fixup content for display in HTML
*/
public function renderMesg() : string
{
@@ -226,7 +225,7 @@ class mesg extends obj
else
$mesg = $this->mesg;
- return nl2br($mesg);
+ return nl2br(str_replace(" ", "&nbsp;", $mesg));
}
/*