--- loncom/xml/londefdef.pm 2005/10/18 21:30:49 1.289
+++ loncom/xml/londefdef.pm 2005/11/03 21:58:11 1.292
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.289 2005/10/18 21:30:49 albertel Exp $
+# $Id: londefdef.pm,v 1.292 2005/11/03 21:58:11 albertel Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -2531,8 +2531,7 @@ sub start_img {
my $inside = &Apache::lonxml::get_all_text("/img",$parser);
return '';
}
- push(@Apache::lonxml::extlinks,
- &Apache::lonnet::clutter(&Apache::lonnet::hreflocation($Apache::lonxml::pwd[-1],$src)));
+ &Apache::lonxml::extlink($src);
my $currentstring = '';
my $scaling = .3;
@@ -2742,12 +2741,10 @@ sub start_applet {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
my $code=&Apache::lonxml::get_param('code',$parstack,$safeeval,undef,1);
- $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=$code;
-
+ &Apache::lonxml::extlink($code);
my $archive=&Apache::lonxml::get_param('archive',$parstack,$safeeval,
undef,1);
- $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=$archive;
-
+ &Apache::lonxml::extlink($archive);
my $currentstring = '';
if ($target eq 'web') {
if ($env{'browser.appletsuppress'} ne 'on') {
@@ -2793,7 +2790,7 @@ sub end_applet {
sub start_embed {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
my $src=&Apache::lonxml::get_param('src',$parstack,$safeeval,undef,1);
- $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=$src;
+ &Apache::lonxml::extlink($src);
my $currentstring = '';
if ($target eq 'web') {
if ($env{'browser.embedsuppress'} ne 'on') {
@@ -2824,13 +2821,15 @@ sub end_embed {
#-- tag (end tag forbidden)
sub start_param {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
- if (&Apache::lonxml::get_param
- ('name',$parstack,$safeeval,undef,1)=~/^cabbase$/i) {
- $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=
- &Apache::lonxml::get_param('value',$parstack,$safeeval,undef,1);
- }
- $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=
- &Apache::lonxml::get_param('src',$parstack,$safeeval,undef,1);
+ if (&Apache::lonxml::get_param('name',$parstack,
+ $safeeval,undef,1)=~/^cabbase$/i) {
+ my $value=&Apache::lonxml::get_param('value',$parstack,
+ $safeeval,undef,1);
+ &Apache::lonxml::extlink($value);
+ }
+
+ my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval,undef,1);
+ &Apache::lonxml::extlink($src);
my $currentstring = '';
if ($target eq 'web') {
my %toconvert;
@@ -2862,9 +2861,8 @@ sub end_param {
sub start_allow {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval,undef,1);
- $src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);
- $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=
- &Apache::lonnet::clutter($src);
+ &Apache::lonxml::extlink($src);
+
if ($target eq 'tex') { &image_replication($src); }
my $result;
if ($target eq 'edit') {
@@ -3458,9 +3456,12 @@ sub end_legend {
#-- tag (end tag forbidden)
sub start_link {
- my ($target,$token) = @_;
+ my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
my $currentstring = '';
if ($target eq 'web') {
+ my $href=&Apache::lonxml::get_param('href',$parstack,$safeeval,
+ undef,1);
+ &Apache::lonxml::extlink($href);
$currentstring = $token->[4];
}
return $currentstring;