--- loncom/publisher/loncleanup.pm 2005/05/29 01:46:16 1.4 +++ loncom/publisher/loncleanup.pm 2006/05/30 12:47:41 1.8 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to cleanup XML files # -# $Id: loncleanup.pm,v 1.4 2005/05/29 01:46:16 www Exp $ +# $Id: loncleanup.pm,v 1.8 2006/05/30 12:47:41 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -38,6 +38,9 @@ use Apache::loncacc; use Apache::loncommon(); use Apache::lonlocal; use Apache::lonnet; +use lib '/home/httpd/lib/perl/'; +use LONCAPA; + sub latextrans { my $symbolfont=shift; @@ -218,8 +221,9 @@ sub htmlclean { } # Generate empty tags, remove wrong end tags unless ($blockemptytags) { - $raw=~s/\<(br|hr|img|meta|allow|basefont)([^\>\/]*?)\>/\<$1$2 \/\>/gis; - $raw=~s/\<\/(br|hr|img|meta|allow|basefont)\>//gis; + $raw=~s/\<(br|hr|img|meta|embed|allow|basefont)([^\>]*?)\>/\<$1$2 \/\>/gis; + $raw=~s/\<\/(br|hr|img|meta|embed|allow|basefont)\>//gis; + $raw=~s/\/ \/\>/\/\>/gs; unless ($full) { $raw=~s/\<[\/]*(body|head|html)\>//gis; } @@ -293,9 +297,9 @@ sub phasetwo { $warningcount.' '.&mt('warning(s)'). '
'. &mt('Open (and edit) cleaned up file in new window').''. - '
'. + &escape($newuri).'" target="prev">'. &mt('Show diffs in new window').'
'. ''. ''. @@ -363,9 +367,7 @@ sub handler { &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; - $r->print('LON-CAPA Construction Space'); - - $r->print(&Apache::loncommon::bodytag('Cleanup XML Document')); + $r->print(&Apache::loncommon::start_page('Cleanup XML Document')); $r->print('

'.$fn.'

'. '
'. ''); @@ -385,7 +387,7 @@ sub handler { $r->print('
'. '
'.&mt('Back to Source File').''. '
'.&mt('Back to Source Directory').''. - ''); + &Apache::loncommon::end_page()); return OK; }