version 1.91, 2002/10/08 15:35:22
|
version 1.92, 2002/10/08 20:09:17
|
Line 330 sub end_m {
|
Line 330 sub end_m {
|
#-- <body> tag |
#-- <body> tag |
sub start_body { |
sub start_body { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; |
# my ($target,$token) = @_; |
|
my $currentstring = ''; |
my $currentstring = ''; |
if ($target eq 'web') { |
if ($target eq 'web') { |
if (!$Apache::lonxml::registered) { |
if (!$Apache::lonxml::registered) { |
Line 1617 sub start_table {
|
Line 1616 sub start_table {
|
if ($alt) { |
if ($alt) { |
$currentstring .= ' '.$alt.' '; |
$currentstring .= ' '.$alt.' '; |
} else { |
} else { |
#there are no image and alt attribute |
#<allow> tag will care about replication |
$currentstring .= ' THE ORIGINAL PROBLEM CONTAINS EMPTY IMG TAG WITHOUT IMAGE AND ALT ATTRIBUTE '; |
|
} |
} |
} |
} |
} |
} |
Line 1716 sub start_embed {
|
Line 1714 sub start_embed {
|
} |
} |
#-- <allow> tag |
#-- <allow> tag |
sub start_allow { |
sub start_allow { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; |
$Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]= |
$Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]= |
$token->[2]->{'src'}; |
$token->[2]->{'src'}; |
my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval); |
my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval); |
if (not -e '/home/httpd/html'.$src) { |
if (not -e '/home/httpd/html'.$src) { |
#replicates image itself |
#replicates image itself |
&Apache::lonnet::repcopy($src); |
&Apache::lonnet::repcopy('/home/httpd/html'.$src); |
#replicates eps or ps |
#replicates eps or ps |
my $newsrc = $src; |
my $newsrc = $src; |
$newsrc =~ s/(.gif|.jpg)$/.eps/; |
$newsrc =~ s/(.gif|.jpg)$/.eps/; |
if (not-e $newsrc && &Apache::lonnet::repcopy($newsrc) ne 'OK') { |
if (not-e $newsrc && &Apache::lonnet::repcopy('/home/httpd/html'.$newsrc) ne 'OK') { |
$newsrc =~ s/\.ps$/\.eps/; |
$newsrc =~ s/\.ps$/\.eps/; |
&Apache::lonnet::repcopy($newsrc); |
&Apache::lonnet::repcopy('/home/httpd/html'.$newsrc); |
} |
} |
} |
} |
return ''; |
return ''; |
} |
} |
sub end_allow { |
sub end_allow { |
return ''; |
return ''; |