--- loncom/interface/lonmsg.pm 2004/03/26 19:35:59 1.95 +++ loncom/interface/lonmsg.pm 2004/04/06 15:56:37 1.97 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging # -# $Id: lonmsg.pm,v 1.95 2004/03/26 19:35:59 www Exp $ +# $Id: lonmsg.pm,v 1.97 2004/04/06 15:56:37 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -110,15 +110,15 @@ my $sqs; sub packagemsg { my ($subject,$message,$citation,$baseurl,$attachmenturl)=@_; - $message =&HTML::Entities::encode($message); - $citation=&HTML::Entities::encode($citation); - $subject =&HTML::Entities::encode($subject); + $message =&HTML::Entities::encode($message,'<>&"'); + $citation=&HTML::Entities::encode($citation,'<>&"'); + $subject =&HTML::Entities::encode($subject,'<>&"'); #remove machine specification $baseurl =~ s|^http://[^/]+/|/|; - $baseurl =&HTML::Entities::encode($baseurl); + $baseurl =&HTML::Entities::encode($baseurl,'<>&"'); #remove machine specification $attachmenturl =~ s|^http://[^/]+/|/|; - $attachmenturl =&HTML::Entities::encode($attachmenturl); + $attachmenturl =&HTML::Entities::encode($attachmenturl,'<>&"'); my $now=time; $msgcount++; @@ -205,7 +205,7 @@ sub sendemail { my $msg = new Mail::Send; $msg->to($to); $msg->subject('[LON-CAPA] '.$subject); - if (my $fh = $msg->open('smtp',Server => 'localhost')) { + if (my $fh = $msg->open()) { print $fh $body; $fh->close; }