version 1.219, 2007/02/01 02:38:05
|
version 1.222, 2007/03/02 23:20:17
|
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) { |
my %all_hostnames = &Apache::lonnet::all_hostnames(); |
if ($_ eq $host) { |
foreach my $hostname (values(%all_hostnames)) { |
$url=~s/^http\:\/\///; |
if ($hostname eq $host) { |
$url=~s/^$host//; |
$url=~s/^(?:http|https|ftp)\:\/\///; |
|
$url=~s/^\Q$host\E//; |
} |
} |
} |
} |
if ($url=~/^http\:\/\//) { return $url; } |
if ($url=~/^(?:http|https|ftp)\:\/\//) { return $url; } |
$url=~s/\~$cuname/res\/$cudom\/$cuname/; |
$url=~s{\Q~$cuname\E}{res/$cudom/$cuname}; |
return $url; |
return $url; |
} |
} |
|
|
Line 468 sub set_allow {
|
Line 469 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; |
} |
} |