diff --git a/web/lib/text2html.php b/web/lib/text2html.php
index 25474be..99564d0 100644
--- a/web/lib/text2html.php
+++ b/web/lib/text2html.php
@@ -3,8 +3,8 @@
function text2html($text,$ifnoe) {
if (is_null($text) || preg_match('#^\s*$#',$text)===1)
return $ifnoe;
- $text=htmlspecialchars($text,ENT_QUOTES|ENT_HTML5,'UTF-8');
- $text=preg_replace('#(https?://.+?)(\n|\s|$|\W\s|\W\n|\W$)#','$1$2',$text);
+ $text=preg_replace(['#<#','#>#'],['<','>'],$text);
+ $text=preg_replace('#(https?://.+?)(\s|$|\W\s|\W$)#m','$1$2',$text);
$text=nl2br($text);
return $text;
}