diff --git a/src/messenger/webim/libs/chat.php b/src/messenger/webim/libs/chat.php index a30ed77f..eb3bee87 100644 --- a/src/messenger/webim/libs/chat.php +++ b/src/messenger/webim/libs/chat.php @@ -85,7 +85,7 @@ function post_message($threadid, $kind, $message, $from = null, $agentid = null) function prepare_html_message($text) { $escaped_text = safe_htmlspecialchars($text); - $text_w_links = preg_replace('/(http|ftp):\/\/\S*/', '$0', $escaped_text); + $text_w_links = preg_replace('/(?i)(http|https|ftp):\/\/\S*/', '$0', $escaped_text); $multiline = str_replace("\n", "
", $text_w_links); return $multiline; }