Diff for /loncom/publisher/loncleanup.pm between versions 1.1 and 1.2

version 1.1, 2005/05/28 01:32:33 version 1.2, 2005/05/28 02:18:03
Line 208  sub symbolfontreplace { Line 208  sub symbolfontreplace {
 }  }
   
 sub htmlclean {  sub htmlclean {
     my ($raw,$full)=@_;      my ($raw,$full,$blocklinefeed,$blockemptytags,$blocklowercasing,$blockdesymboling)=@_;
 # Take care of CRLF etc  # Take care of CRLF etc
       unless ($blocklinefeed) {
     $raw=~s/\r\f/\n/gs; $raw=~s/\f\r/\n/gs;   $raw=~s/\r\f/\n/gs; $raw=~s/\f\r/\n/gs;
     $raw=~s/\r\n/\n/gs; $raw=~s/\n\r/\n/gs;   $raw=~s/\r\n/\n/gs; $raw=~s/\n\r/\n/gs;
     $raw=~s/\f/\n/gs; $raw=~s/\r/\n/gs;   $raw=~s/\f/\n/gs; $raw=~s/\r/\n/gs;
     $raw=~s/\&\#10\;/\n/gs; $raw=~s/\&\#13\;/\n/gs;   $raw=~s/\&\#10\;/\n/gs; $raw=~s/\&\#13\;/\n/gs;
       }
 # Generate empty tags, remove wrong end tags  # Generate empty tags, remove wrong end tags
     $raw=~s/\<(br|hr|img|meta|allow|basefont)([^\>\/]*?)\>/\<$1$2 \/\>/gis;      unless ($blockemptytags) {
     $raw=~s/\<\/(br|hr|img|meta|allow|basefont)\>//gis;   $raw=~s/\<(br|hr|img|meta|allow|basefont)([^\>\/]*?)\>/\<$1$2 \/\>/gis;
     unless ($full) {   $raw=~s/\<\/(br|hr|img|meta|allow|basefont)\>//gis;
        $raw=~s/\<[\/]*(body|head|html)\>//gis;   unless ($full) {
       $raw=~s/\<[\/]*(body|head|html)\>//gis;
    }
     }      }
 # Make standard tags lowercase  # Make standard tags lowercase
     foreach ('html','body','head','meta','h1','h2','h3','h4','b','i','m',      unless ($blocklowercasing) {
              'table','tr','td','th','p','br','hr','img','embed','font',   foreach ('html','body','head','meta','h1','h2','h3','h4','b','i','m',
              'a','strong','center','title','basefont','li','ol','ul',   'table','tr','td','th','p','br','hr','img','embed','font',
              'input','select','form','option','script','pre') {   'a','strong','center','title','basefont','li','ol','ul',
  $raw=~s/\<$_\s*\>/\<$_\>/gis;   'input','select','form','option','script','pre') {
         $raw=~s/\<\/$_\s*\>/<\/$_\>/gis;      $raw=~s/\<$_\s*\>/\<$_\>/gis;
         $raw=~s/\<$_\s([^\>]*)\>/<$_ $1\>/gis;      $raw=~s/\<\/$_\s*\>/<\/$_\>/gis;
       $raw=~s/\<$_\s([^\>]*)\>/<$_ $1\>/gis;
    }
       }
   # Replace <font face="symbol">
       unless ($blockdesymboling) {
    $raw=&symbolfontreplace($raw);
     }      }
     return $raw;      return $raw;
 }  }
   
 sub phaseone {  sub phaseone {
       my ($r,$fn,$uname,$udom)=@_;
 }  }
   
 sub phasetwo {  sub phasetwo {
       my ($r,$fn,$uname,$udom)=@_;
   }
   
   sub phasethree {
       my ($r,$fn,$uname,$udom)=@_;
 }  }
   
 # ---------------------------------------------------------------- Main Handler  # ---------------------------------------------------------------- Main Handler
Line 289  sub handler { Line 303  sub handler {
   
   $r->print(&Apache::loncommon::bodytag('Cleanup XML Document'));    $r->print(&Apache::loncommon::bodytag('Cleanup XML Document'));
   
   if ($env{'form.phase'} eq 'two') {    if ($env{'form.phase'} eq 'three') {
         &phasethree($r,$fn,$uname,$udom);
     } elsif ($env{'form.phase'} eq 'two') {
       &phasetwo($r,$fn,$uname,$udom);        &phasetwo($r,$fn,$uname,$udom);
   } else {    } else {
       &phaseone($r,$fn,$uname,$udom);        &phaseone($r,$fn,$uname,$udom);

Removed from v.1.1  
changed lines
  Added in v.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>
500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.