Diff for /loncom/publisher/lonpublisher.pm between versions 1.219 and 1.220

version 1.219, 2007/02/01 02:38:05 version 1.220, 2007/02/21 21:01:59
Line 409  sub urlfixup { Line 409  sub urlfixup {
     if ($url =~ /^mailto:/i) { return $url; }      if ($url =~ /^mailto:/i) { return $url; }
     #internal document links need no fixing      #internal document links need no fixing
     if ($url =~ /^\#/) { return $url; }       if ($url =~ /^\#/) { return $url; } 
     my ($host)=($url=~/(?:http\:\/\/)*([^\/]+)/);      my ($host)=($url=~/(?:(?:http|https|ftp)\:\/\/)*([^\/]+)/);
     foreach (values %Apache::lonnet::hostname) {      foreach (values %Apache::lonnet::hostname) {
  if ($_ eq $host) {   if ($_ eq $host) {
     $url=~s/^http\:\/\///;      $url=~s/^(?:http|https|ftp)\:\/\///;
             $url=~s/^$host//;              $url=~s/^$host//;
         }          }
     }      }
     if ($url=~/^http\:\/\//) { return $url; }      if ($url=~/^(?:http|https|ftp)\:\/\//) { return $url; }
     $url=~s/\~$cuname/res\/$cudom\/$cuname/;      $url=~s/\~$cuname/res\/$cudom\/$cuname/;
     return $url;      return $url;
 }  }
Line 468  sub set_allow { Line 468  sub set_allow {
     }      }
     if (($newurl !~ /^javascript:/i) &&      if (($newurl !~ /^javascript:/i) &&
  ($newurl !~ /^mailto:/i) &&   ($newurl !~ /^mailto:/i) &&
  ($newurl !~ /^http:/i) &&   ($newurl !~ /^(?:http|https|ftp):/i) &&
  ($newurl !~ /^\#/)) {   ($newurl !~ /^\#/)) {
  $$allow{&absoluteurl($newurl,$target)}=1;   $$allow{&absoluteurl($newurl,$target)}=1;
     }      }

Removed from v.1.219  
changed lines
  Added in v.1.220


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