--- loncom/interface/lontemplate.pm 2010/04/27 02:44:57 1.44 +++ loncom/interface/lontemplate.pm 2011/05/03 21:38:40 1.45 @@ -1,7 +1,7 @@ # The LearningOnline Network # "Template" Functions to generate html output # -# $Id: lontemplate.pm,v 1.44 2010/04/27 02:44:57 faziophi Exp $ +# $Id: lontemplate.pm,v 1.45 2011/05/03 21:38:40 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -176,8 +176,12 @@ sub print_template_fields { &Apache::lontemplate::print_end_template($r); } else { my $safeinit; - $r->print(&Apache::lonxml::xmlparse($r,'tex','

'.$fields{$field}.'

')); - $r->print(&Apache::lonxml::xmlparse($r,'tex',$message)); + if ($fields{$field}=~/\w/) { + $r->print(&Apache::lonxml::xmlparse($r,'tex','

'.$fields{$field}.'

')); + } else { + $r->print(&Apache::lonxml::xmlparse($r,'tex','
')); + } + $r->print(&Apache::lonxml::xmlparse($r,'tex',$message)); } push(@html_ids,$field); }