Diff for /loncom/interface/lonfeedback.pm between versions 1.106 and 1.107

version 1.106, 2004/07/24 18:19:38 version 1.107, 2004/07/27 23:35:34
Line 1428  ENDREDIR Line 1428  ENDREDIR
   
 sub no_redirect_back {  sub no_redirect_back {
   my ($r,$feedurl) = @_;    my ($r,$feedurl) = @_;
     my $nofeed=&mt('Sorry, no feedback possible on this resource  ...');
   $r->print (<<ENDNOREDIR);    $r->print (<<ENDNOREDIR);
 <html>  <html>
 <head><title>Feedback not sent</title>  <head><title>Feedback not sent</title>
Line 1442  ENDNOREDIR Line 1443  ENDNOREDIR
 </head>  </head>
 <body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { self.close(); }'>  <body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { self.close(); }'>
 <img align="right" src="/adm/lonIcons/lonlogos.gif" />  <img align="right" src="/adm/lonIcons/lonlogos.gif" />
 <b>Sorry, no feedback possible on this resource  ...</b>  <b>$nofeed</b>
 </body>  </body>
 </html>  </html>
 ENDNOREDIRTWO  ENDNOREDIRTWO
Line 1509  sub resource_output { Line 1510  sub resource_output {
 sub clear_out_html {  sub clear_out_html {
   my ($message,$override)=@_;    my ($message,$override)=@_;
   unless (&Apache::lonhtmlcommon::htmlareablocked()) { return $message; }    unless (&Apache::lonhtmlcommon::htmlareablocked()) { return $message; }
   # Always allow the <m>-tag
     my %html=(M=>1);
   # Check if more is allowed
   my $cid=$ENV{'request.course.id'};    my $cid=$ENV{'request.course.id'};
   if (($ENV{"course.$cid.allow_limited_html_in_feedback"} =~ m/yes/i) ||    if (($ENV{"course.$cid.allow_limited_html_in_feedback"} =~ m/yes/i) ||
       ($override)) {        ($override)) {
       # allows <B> <I> <P> <A> <LI> <OL> <UL> <EM> <BR> <TT> <STRONG>         # allows <B> <I> <P> <A> <LI> <OL> <UL> <EM> <BR> <TT> <STRONG> 
       # <BLOCKQUOTE> <DIV .*> <DIV> <IMG> <M> <SPAN> <H1> <H2> <H3> <H4> <SUB>        # <BLOCKQUOTE> <DIV .*> <DIV> <IMG> <M> <SPAN> <H1> <H2> <H3> <H4> <SUB>
       # <SUP>        # <SUP>
       my %html=(B=>1, I=>1, P=>1, A=>1, LI=>1, OL=>1, UL=>1, EM=>1,        %html=(B=>1, I=>1, P=>1, A=>1, LI=>1, OL=>1, UL=>1, EM=>1,
  BR=>1, TT=>1, STRONG=>1, BLOCKQUOTE=>1, DIV=>1, IMG=>1,       BR=>1, TT=>1, STRONG=>1, BLOCKQUOTE=>1, DIV=>1, IMG=>1,
                 M=>1, SUB=>1, SUP=>1, SPAN=>1,        M=>1, SUB=>1, SUP=>1, SPAN=>1, 
  H1=>1, H2=>1, H3=>1, H4=>1, H5=>1);       H1=>1, H2=>1, H3=>1, H4=>1, H5=>1);
     }
       $message =~ s/\<(\/?\s*(\w+)[^\>\<]*)/  # Do the substitution of everything that is not explicitly allowed
     $message =~ s/\<(\/?\s*(\w+)[^\>\<]*)/
   {($html{uc($2)}&&(length($1)<1000))?"\<$1":"\&lt;$1"}/ge;    {($html{uc($2)}&&(length($1)<1000))?"\<$1":"\&lt;$1"}/ge;
       $message =~ s/(\<?\s*(\w+)[^\<\>]*)\>/    $message =~ s/(\<?\s*(\w+)[^\<\>]*)\>/
   {($html{uc($2)}&&(length($1)<1000))?"$1\>":"$1\&gt;"}/ge;    {($html{uc($2)}&&(length($1)<1000))?"$1\>":"$1\&gt;"}/ge;
   } else {  
       $message=~s/\</\&lt\;/g;  
       $message=~s/\>/\&gt\;/g;  
   }  
   return $message;    return $message;
 }  }
   
Line 1757  sub show_preview { Line 1758  sub show_preview {
 }  }
   
 sub generate_preview_button {  sub generate_preview_button {
     my $pre=&mt("Show Preview");      my $pre=&mt("Show Preview and Check Spelling");
     return(<<ENDPREVIEW);      return(<<ENDPREVIEW);
 <form name="preview" action="/adm/feedback?preview=1" method="post" target="preview">  <form name="preview" action="/adm/feedback?preview=1" method="post" target="preview">
 <input type="hidden" name="subject">  <input type="hidden" name="subject">

Removed from v.1.106  
changed lines
  Added in v.1.107


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>