[LON-CAPA-cvs] cvs: loncom /interface lonchat.pm lonmsg.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 23 Jun 2003 22:25:15 -0000


albertel		Mon Jun 23 18:25:15 2003 EDT

  Modified files:              
    /loncom/interface	lonchat.pm lonmsg.pm 
  Log:
  - fixes BUG#1809, call clear_out_html for chat and internal messages
  
  
Index: loncom/interface/lonchat.pm
diff -u loncom/interface/lonchat.pm:1.5 loncom/interface/lonchat.pm:1.6
--- loncom/interface/lonchat.pm:1.5	Fri Jun 20 11:01:02 2003
+++ loncom/interface/lonchat.pm	Mon Jun 23 18:25:14 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Chat
 #
-# $Id: lonchat.pm,v 1.5 2003/06/20 15:01:02 bowersj2 Exp $
+# $Id: lonchat.pm,v 1.6 2003/06/23 22:25:14 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -39,7 +39,7 @@
     return OK if $r->header_only;
 
     if ($ENV{'form.newchat'}) {
-	&Apache::lonnet::chatsend($ENV{'form.newchat'},$ENV{'form.anonymous'});
+	&Apache::lonnet::chatsend(&Apache::lonfeedback::clear_out_html($ENV{'form.newchat'}),$ENV{'form.anonymous'});
     }
 # --------------------------------------------------- Print login screen header
     my $latexHelp = Apache::loncommon::helpLatexCheatsheet();
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.55 loncom/interface/lonmsg.pm:1.56
--- loncom/interface/lonmsg.pm:1.55	Fri Jun 20 10:55:01 2003
+++ loncom/interface/lonmsg.pm	Mon Jun 23 18:25:14 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging
 #
-# $Id: lonmsg.pm,v 1.55 2003/06/20 14:55:01 bowersj2 Exp $
+# $Id: lonmsg.pm,v 1.56 2003/06/23 22:25:14 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -839,14 +839,14 @@
          $r->print('Sending critical: '.
                 &user_crit_msg($content{'sendername'},
                                  $content{'senderdomain'},
-                                 $ENV{'form.subject'},
-                                 $ENV{'form.message'},
+                                 &Apache::lonfeedback::clear_out_html($ENV{'form.subject'}),
+                                 &Apache::lonfeedback::clear_out_html($ENV{'form.message'}),
                                  $ENV{'form.sendbck'}));
       } else {
          $r->print('Sending: '.&user_normal_msg($content{'sendername'},
                                  $content{'senderdomain'},
-                                 $ENV{'form.subject'},
-                                 $ENV{'form.message'}));
+                                 &Apache::lonfeedback::clear_out_html($ENV{'form.subject'}),
+                                 &Apache::lonfeedback::clear_out_html($ENV{'form.message'})));
       }
       if ($ENV{'form.displayedcrit'}) {
           &discrit($r);
@@ -930,18 +930,18 @@
       }
     foreach (keys %toaddr) {
       my ($recuname,$recdomain)=split(/\:/,$_);
-      my $msgtxt=$ENV{'form.message'};
+      my $msgtxt=&Apache::lonfeedback::clear_out_html($ENV{'form.message'});
       if ($toaddr{$_}) { $msgtxt.='<hr>'.$toaddr{$_}; }    
       if ((($ENV{'form.critmsg'}) || ($ENV{'form.sendbck'})) && 
           (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))) {
          $r->print('Sending critical: '.
                 &user_crit_msg($recuname,$recdomain,
-                                 $ENV{'form.subject'},
+               &Apache::lonfeedback::clear_out_html($ENV{'form.subject'}),
                                  $msgtxt,
                                  $ENV{'form.sendbck'}));
       } else {
          $r->print('Sending: '.&user_normal_msg($recuname,$recdomain,
-                                 $ENV{'form.subject'},
+              &Apache::lonfeedback::clear_out_html($ENV{'form.subject'}),
                                  $msgtxt,
                                  $content{'citation'}));
       }