Diff for /rat/map.pm between versions 1.3 and 1.6

version 1.3, 2006/12/05 02:55:55 version 1.6, 2007/01/26 23:37:51
Line 29 Line 29
 package LONCAPA::map;  package LONCAPA::map;
   
 use HTML::TokeParser;  use HTML::TokeParser;
   use HTML::Entities();
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::lonlocal;  use Apache::lonlocal;
 use File::Copy;  use File::Copy;
Line 439  sub qtescape { Line 440  sub qtescape {
     $str=~s/\&\#58\;/\:/g;      $str=~s/\&\#58\;/\:/g;
     $str=~s/\&\#39\;/\'/g;      $str=~s/\&\#39\;/\'/g;
     $str=~s/\&\#44\;/\,/g;      $str=~s/\&\#44\;/\,/g;
     $str=~s/\"/\&\#34\;/g;      $str=~s/\&\#34\;/\"/g;
     return $str;      return $str;
 }  }
   
Line 476  sub loadmap { Line 477  sub loadmap {
     if ($instr eq -2) {      if ($instr eq -2) {
         $errtext.='Map not loaded: An error occured while trying to load the map.';          $errtext.='Map not loaded: An error occured while trying to load the map.';
     } elsif ($instr eq '-1') {      } elsif ($instr eq '-1') {
         $errtext.=&mt('Map not loaded: The file [_1] does not exist.',$fn);   # Map doesn't exist 
     } elsif ($instr) {      } elsif ($instr) {
         my $parser = HTML::TokeParser->new(\$instr);          my $parser = HTML::TokeParser->new(\$instr);
         my $token;          my $token;
Line 625  sub savemap { Line 626  sub savemap {
 # --------------------------------------------------------------- Logical input  # --------------------------------------------------------------- Logical input
  if (($comp[$#comp] eq 'res') || ($comp[$#comp] eq 'zombie')) {   if (($comp[$#comp] eq 'res') || ($comp[$#comp] eq 'zombie')) {
     $comp[0]=qtescape($comp[0]);      $comp[0]=qtescape($comp[0]);
       $comp[0] = &HTML::Entities::encode($comp[0],'&<>"');
       
     $comp[1]=qtescape($comp[1]);      $comp[1]=qtescape($comp[1]);
     if ($comp[2] eq 'true') {      if ($comp[2] eq 'true') {
  if ($comp[1]!~/^http\:\/\//) {   if ($comp[1]!~/^http\:\/\//) {

Removed from v.1.3  
changed lines
  Added in v.1.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>