--- loncom/xml/londefdef.pm 2007/01/17 10:09:26 1.351 +++ loncom/xml/londefdef.pm 2007/01/18 20:48:02 1.352 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.351 2007/01/17 10:09:26 foxr Exp $ +# $Id: londefdef.pm,v 1.352 2007/01/18 20:48:02 albertel Exp $ # # # Copyright Michigan State University Board of Trustees @@ -1570,13 +1570,15 @@ sub end_a { $currentstring .= $token->[2]; } if ($target eq 'tex') { - my $a=&Apache::lonxml::get_param('href',$parstack,$safeeval,undef,1); - my $b=&Apache::lonxml::get_param('name',$parstack,$safeeval,undef,1); - if ($a=~/\S/) { - $a=~s/([^\\])%/$1\\\%/g; - $currentstring .= ' ({\tt URI:'.&Apache::lonxml::latex_special_symbols($a).'})'; - } elsif ($b=~/\S/) { - $currentstring .= ' ({\tt Anchor:'.&Apache::lonxml::latex_special_symbols($b).'})'; + my $href = + &Apache::lonxml::get_param('href',$parstack,$safeeval,undef,1); + my $name = + &Apache::lonxml::get_param('name',$parstack,$safeeval,undef,1); + if ($href =~ /\S/) { + $href =~ s/([^\\])%/$1\\\%/g; + $currentstring .= ' ({\tt URI:'.&Apache::lonxml::latex_special_symbols($href).'})'; + } elsif ($name =~ /\S/) { + $currentstring .= ' ({\tt Anchor:'.&Apache::lonxml::latex_special_symbols($name).'})'; } else { $currentstring.=''; }