--- loncom/xml/lonxml.pm 2005/01/30 23:31:12 1.355 +++ loncom/xml/lonxml.pm 2005/02/17 08:34:56 1.356 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.355 2005/01/30 23:31:12 www Exp $ +# $Id: lonxml.pm,v 1.356 2005/02/17 08:34:56 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -149,20 +149,23 @@ $Apache::lonxml::post_evaluate=1; $Apache::lonxml::warnings_error_header=''; sub xmlbegin { - my $output=''; - @htmlareafields=(); - if ($ENV{'browser.mathml'}) { - $output='' + my ($style)=@_; + my $output=''; + @htmlareafields=(); + if ($ENV{'browser.mathml'}) { + $output='' .'' .']>' .''; - } else { - $output=' -'; - } - return $output; + .'xmlns="http://www.w3.org/TR/REC-html40">'; + } else { + $output=''; + } + if ($style eq 'encode') { + $output=&HTML::Entities::encode($output,'<>&"'); + } + return $output; } sub xmlend { @@ -284,7 +287,7 @@ sub printtokenheader { } } -sub fontsettings() { +sub fontsettings { my $headerstring=''; if (($ENV{'browser.os'} eq 'mac') && (!$ENV{'browser.mathml'})) { $headerstring.=