--- loncom/interface/lonfeedback.pm 2010/08/25 00:46:37 1.300 +++ loncom/interface/lonfeedback.pm 2010/08/26 03:59:16 1.301 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.300 2010/08/25 00:46:37 raeburn Exp $ +# $Id: lonfeedback.pm,v 1.301 2010/08/26 03:59:16 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -850,6 +850,11 @@ sub postingform_display { if (&Apache::lonhtmlcommon::htmlareabrowser()) { $postingform = &Apache::lonhtmlcommon::htmlareaselectactive(); $textareaclass = 'class="LC_richDefaultOff"'; + if ($env{'request.course.id'}) { + unless (($env{'course.'.$env{'request.course.id'}.'.allow_limited_html_in_feedback'} =~ /^\s*yes\s*$/i) || ($env{'form.sendmessageonly'})) { + undef($textareaclass); + } + } } $postingform .= (< @@ -1699,6 +1704,11 @@ END if (&Apache::lonhtmlcommon::htmlareabrowser()) { $textareaheader = &Apache::lonhtmlcommon::htmlareaselectactive(); $textareaclass = 'class="LC_richDefaultOff"'; + if ($env{'request.course.id'}) { + unless (($env{'course.'.$env{'request.course.id'}.'.allow_limited_html_in_feedback'} =~ /^\s*yes\s*$/i) || ($env{'form.sendmessageonly'})) { + undef($textareaclass); + } + } } # Breadcrumbs @@ -3910,7 +3920,11 @@ ENDREDIR } } # Filter HTML out of message (could be nasty) - my $message=&clear_out_html($env{'form.comment'}); + my $override; + if ($env{'form.discuss'} =~ /^(?:author|question|course|policy)$/) { + $override = 1; + } + my $message=&clear_out_html($env{'form.comment'},$override); # Assemble email my ($email,$citations)=&assemble_email($message,$prevattempts,