]> git.mjollnir.org Git - moodle.git/commitdiff
Chat room text is now filtered
authormoodler <moodler>
Mon, 16 Feb 2004 17:39:05 +0000 (17:39 +0000)
committermoodler <moodler>
Mon, 16 Feb 2004 17:39:05 +0000 (17:39 +0000)
mod/chat/gui_header_js/jsupdate.php
mod/chat/lib.php
mod/chat/view.php

index 33e025228f7bf272bc8d9657760db79616dad33f..d5734c6a3d066ee22e36606f22a2a62ab8fad86d 100644 (file)
@@ -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;
                  }
index ddffc37b1f6aeb8831386b5ef66b0be1c30935bf..94764119cec057f7f9290a320a1a9bc22eb9da88 100644 (file)
@@ -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));
index 3d1b910ef5609b71c59a9ae653553db5aebf61f8..a9c29a67afa6a466fafca359c0bedea56fc43eb4 100644 (file)
     }
 
     if ($chat->intro) {
-        print_simple_box( text_to_html($chat->intro) , "center");
+        print_simple_box( format_text($chat->intro) , "center");
         echo "<br />";
     }