From: moodler Date: Mon, 16 Feb 2004 17:39:05 +0000 (+0000) Subject: Chat room text is now filtered X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=62a575d15753a5b82be059ae632e7a1ed7657afa;p=moodle.git Chat room text is now filtered --- diff --git a/mod/chat/gui_header_js/jsupdate.php b/mod/chat/gui_header_js/jsupdate.php index 33e025228f..d5734c6a3d 100644 --- a/mod/chat/gui_header_js/jsupdate.php +++ b/mod/chat/gui_header_js/jsupdate.php @@ -47,7 +47,7 @@ header("Refresh: $CFG->chat_refresh_room; URL=jsupdate.php?chat_sid=".$chat_sid. "chatid = '$chatuser->chatid' AND timestamp > '$chat_lasttime'", "timestamp ASC")) { foreach ($messages as $message) { - $formatmessage = chat_format_message($message); + $formatmessage = chat_format_message($message, $chat->course); if ($formatmessage->beep) { $beep = $formatmessage->beep; } diff --git a/mod/chat/lib.php b/mod/chat/lib.php index ddffc37b1f..94764119ce 100644 --- a/mod/chat/lib.php +++ b/mod/chat/lib.php @@ -508,6 +508,7 @@ function chat_format_message($message, $courseid=0) { convert_urls_into_links($text); replace_smilies($text); + $text = filter_text($text, $courseid); if (substr($text, 0, 5) == "beep ") { /// It's a beep! $beepwho = trim(substr($text, 5)); diff --git a/mod/chat/view.php b/mod/chat/view.php index 3d1b910ef5..a9c29a67af 100644 --- a/mod/chat/view.php +++ b/mod/chat/view.php @@ -108,7 +108,7 @@ } if ($chat->intro) { - print_simple_box( text_to_html($chat->intro) , "center"); + print_simple_box( format_text($chat->intro) , "center"); echo "
"; }