--- loncom/xml/lonxml.pm 2004/10/07 16:27:48 1.342 +++ loncom/xml/lonxml.pm 2004/10/12 22:55:22 1.344 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.342 2004/10/07 16:27:48 albertel Exp $ +# $Id: lonxml.pm,v 1.344 2004/10/12 22:55:22 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -159,7 +159,8 @@ sub xmlbegin { .''; } else { - $output=''; + $output=' +'; } return $output; } @@ -287,7 +288,7 @@ sub fontsettings() { my $headerstring=''; if (($ENV{'browser.os'} eq 'mac') && (!$ENV{'browser.mathml'})) { $headerstring.= - ''; + ''; } elsif (!$ENV{'browser.mathml'} && $ENV{'browser.unicode'}) { $headerstring.= ''; @@ -1288,7 +1289,7 @@ $bodytag ENDNOTFOUND - $filecontents=''; + $filecontents=''; if ($ENV{'request.state'} ne 'published') { if ($filetype eq 'sty') { $filecontents=&createnewsty(); @@ -1299,6 +1300,10 @@ ENDNOTFOUND } } else { unless ($ENV{'request.state'} eq 'published') { + if ($filecontents=~/BEGIN LON-CAPA Internal/) { + &Apache::lonxml::error(&mt('This file appears to be a rendering of a Lon-CAPA resource. If this is correct, this resource will act very oddly and incorrectly.')); + } + if ($ENV{'form.attemptclean'}) { $filecontents=&htmlclean($filecontents,1); }