summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2014-01-07 19:25:59 +0100
committerSimon Rettberg2014-01-07 19:25:59 +0100
commit5c68088850ad9dccf9fb53fb778497aa61546425 (patch)
tree433b046e145e0ca2a6bd56439c22acaf07d1c1f1
parentUpdate DB scheme with new config vars (diff)
downloadslx-admin-5c68088850ad9dccf9fb53fb778497aa61546425.tar.gz
slx-admin-5c68088850ad9dccf9fb53fb778497aa61546425.tar.xz
slx-admin-5c68088850ad9dccf9fb53fb778497aa61546425.zip
Fix markup processing if string ends with ':'
-rw-r--r--inc/util.inc.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/util.inc.php b/inc/util.inc.php
index a93ec439..277dde31 100644
--- a/inc/util.inc.php
+++ b/inc/util.inc.php
@@ -66,9 +66,9 @@ class Util
public static function markup($string)
{
$string = htmlspecialchars($string);
- $string = preg_replace('#(^|[\n \-_/\.])\*(.+?)\*($|[ \-_/\.\!\?,])#is', '$1<b>$2</b>$3', $string);
- $string = preg_replace('#(^|[\n \-\*/\.])_(.+?)_($|[ \-\*/\.\!\?,])#is', '$1<u>$2</u>$3', $string);
- $string = preg_replace('#(^|[\n \-_\*\.])/(.+?)/($|[ \-_\*\.\!\?,])#is', '$1<i>$2</i>$3', $string);
+ $string = preg_replace('#(^|[\n \-_/\.])\*(.+?)\*($|[ \-_/\.\!\?,:])#is', '$1<b>$2</b>$3', $string);
+ $string = preg_replace('#(^|[\n \-\*/\.])_(.+?)_($|[ \-\*/\.\!\?,:])#is', '$1<u>$2</u>$3', $string);
+ $string = preg_replace('#(^|[\n \-_\*\.])/(.+?)/($|[ \-_\*\.\!\?,:])#is', '$1<i>$2</i>$3', $string);
return nl2br($string);
}