[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lontemplate.pm

raeburn raeburn at source.lon-capa.org
Sat May 12 08:44:12 EDT 2012


raeburn		Sat May 12 12:44:12 2012 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lontemplate.pm 
  Log:
  - For 2.11
    - Reverse changes from rev 1.44. lonhtmlgateway.pm not in 2.11.0.
  
  
Index: loncom/interface/lontemplate.pm
diff -u loncom/interface/lontemplate.pm:1.45 loncom/interface/lontemplate.pm:1.45.6.1
--- loncom/interface/lontemplate.pm:1.45	Tue May  3 21:38:40 2011
+++ loncom/interface/lontemplate.pm	Sat May 12 12:44:12 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # "Template" Functions to generate html output
 #
-# $Id: lontemplate.pm,v 1.45 2011/05/03 21:38:40 www Exp $
+# $Id: lontemplate.pm,v 1.45.6.1 2012/05/12 12:44:12 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -154,14 +154,20 @@
 
 	foreach my $field (sort(keys(%fields))) {
 		my $message = $data{$field} if (($data{$field}=~/\w/) || ($allowed));
-		my $legacy = 1;
-		my $gateway = Apache::lonhtmlgateway->new($target);
-        $message = &Encode::decode('utf8', $message);		
-        $message = $gateway->process_outgoing_html($message, $legacy);
-        if ((%custom_handlers) && ($custom_handlers{$field})) {
+                if ((%custom_handlers) && ($custom_handlers{$field})) {
 			$custom_handlers{$field}->($r, $field, $message, $group, $data_ref, $fields_ref, $target, $allowed);
 		} else {
 			if (($data{$field}=~/\w/) || ($allowed)) {
+                                if (!&Apache::lonfeedback::contains_block_html($message)) {
+                                        &Apache::lonfeedback::newline_to_br(\$message);
+                                } else {
+                                        $message = &Apache::lonfeedback::tidy_html($message);
+                                }
+                                $message=&Apache::lonhtmlcommon::raw_href_to_link($message);
+                                if ($allowed) {
+                                        $message=&Apache::lonspeller::markeduptext($message);
+                                }
+                                $message=&Apache::lontexconvert::msgtexconverted($message);
 				if ($target ne 'tex') {
 					#output of syllabusfields will be generated here. 
 					&Apache::lontemplate::print_start_template($r,$fields{$field},'LC_Box');
@@ -186,7 +192,6 @@
 				push(@html_ids,$field);
 			}
 		}
-		undef $gateway;
 	}
 	
 	return @html_ids;	




More information about the LON-CAPA-cvs mailing list