Diff for /loncom/publisher/loncleanup.pm between versions 1.4 and 1.8

version 1.4, 2005/05/29 01:46:16 version 1.8, 2006/05/30 12:47:41
Line 38  use Apache::loncacc; Line 38  use Apache::loncacc;
 use Apache::loncommon();  use Apache::loncommon();
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::lonnet;  use Apache::lonnet;
   use lib '/home/httpd/lib/perl/';
   use LONCAPA;
    
   
 sub latextrans {  sub latextrans {
     my $symbolfont=shift;      my $symbolfont=shift;
Line 218  sub htmlclean { Line 221  sub htmlclean {
     }      }
 # Generate empty tags, remove wrong end tags  # Generate empty tags, remove wrong end tags
     unless ($blockemptytags) {      unless ($blockemptytags) {
  $raw=~s/\<(br|hr|img|meta|allow|basefont)([^\>\/]*?)\>/\<$1$2 \/\>/gis;   $raw=~s/\<(br|hr|img|meta|embed|allow|basefont)([^\>]*?)\>/\<$1$2 \/\>/gis;
  $raw=~s/\<\/(br|hr|img|meta|allow|basefont)\>//gis;   $raw=~s/\<\/(br|hr|img|meta|embed|allow|basefont)\>//gis;
    $raw=~s/\/ \/\>/\/\>/gs;
  unless ($full) {   unless ($full) {
     $raw=~s/\<[\/]*(body|head|html)\>//gis;      $raw=~s/\<[\/]*(body|head|html)\>//gis;
  }   }
Line 293  sub phasetwo { Line 297  sub phasetwo {
       $warningcount.' '.&mt('warning(s)').        $warningcount.' '.&mt('warning(s)').
               '<br /><a href="'.$newuri.'" target="prev">'.                '<br /><a href="'.$newuri.'" target="prev">'.
       &mt('Open (and edit) cleaned up file in new window').'</a>'.        &mt('Open (and edit) cleaned up file in new window').'</a>'.
               '<br /><a href="/adm/diff?filename='.&Apache::lonnet::escape($uri).                '<br /><a href="/adm/diff?filename='.&escape($uri).
       '&versionone=priv&filetwo='.        '&versionone=priv&filetwo='.
       &Apache::lonnet::escape($newuri).'" target="prev">'.        &escape($newuri).'" target="prev">'.
       &mt('Show diffs in new window').'</a><br />'.        &mt('Show diffs in new window').'</a><br />'.
       '<input type="hidden" name="phase" value="three" />'.        '<input type="hidden" name="phase" value="three" />'.
       '<input type="submit" name="accept" value="'.&mt('Accept Result').'" />'.        '<input type="submit" name="accept" value="'.&mt('Accept Result').'" />'.
Line 363  sub handler { Line 367  sub handler {
     &Apache::loncommon::content_type($r,'text/html');      &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;      $r->send_http_header;
   
     $r->print('<html><head><title>LON-CAPA Construction Space</title></head>');      $r->print(&Apache::loncommon::start_page('Cleanup XML Document'));
   
     $r->print(&Apache::loncommon::bodytag('Cleanup XML Document'));  
     $r->print('<h2>'.$fn.'</h2>'.      $r->print('<h2>'.$fn.'</h2>'.
               '<form action="/adm/cleanup" method="post">'.                '<form action="/adm/cleanup" method="post">'.
               '<input type="hidden" name="filename" value="'.$env{'form.filename'}.'" />');                '<input type="hidden" name="filename" value="'.$env{'form.filename'}.'" />');
Line 385  sub handler { Line 387  sub handler {
     $r->print('</form>'.      $r->print('</form>'.
       '<br /><a href="/priv/'.$uname.'/'.$fn.'">'.&mt('Back to Source File').'</a>'.        '<br /><a href="/priv/'.$uname.'/'.$fn.'">'.&mt('Back to Source File').'</a>'.
               '<br /><a href="/priv/'.$uname.'/'.$dir.'">'.&mt('Back to Source Directory').'</a>'.                '<br /><a href="/priv/'.$uname.'/'.$dir.'">'.&mt('Back to Source Directory').'</a>'.
       '</body></html>');        &Apache::loncommon::end_page());
     return OK;        return OK;  
 }  }
   

Removed from v.1.4  
changed lines
  Added in v.1.8


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>