[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm
Guy Albertelli II
lon-capa-cvs@mail.lon-capa.org
Tue, 8 Oct 2002 17:51:48 -0400 (EDT)
Hi Alex,
> my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval);
> &image_replication($src);
> $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);
The <img> tag might have relative references.
<img src="myimage.jpg" />
Your image replication routine expects an absolute reference.
I suggest always passing image_replication an absolute path:
> my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval);
> $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);
> &image_replication($src);
And in allow
&image_replication('/home/httpd/html'.$src);
--
guy@albertelli.com BM: n^20 t20 z20 qS
Guy Albertelli -7-7-9- O-
Explaining the ineffable can be difficult -E.O. Wilson