version 1.321, 2006/03/24 18:09:27
|
version 1.324, 2006/03/29 19:39:55
|
Line 3007 sub headtag {
|
Line 3007 sub headtag {
|
$env{'internal.head.redirect'} = $url; |
$env{'internal.head.redirect'} = $url; |
$result.=<<ADDMETA |
$result.=<<ADDMETA |
<meta http-equiv="pragma" content="no-cache" /> |
<meta http-equiv="pragma" content="no-cache" /> |
<meta HTTP-EQUIV="Refresh" CONTENT="2; url=$url" /> |
<meta HTTP-EQUIV="Refresh" CONTENT="$time; url=$url" /> |
ADDMETA |
ADDMETA |
} |
} |
if (!defined($title)) { |
if (!defined($title)) { |
Line 3015 ADDMETA
|
Line 3015 ADDMETA
|
} |
} |
|
|
$result .= '<title> LON-CAPA '.&mt($title).'</title>'.$head_extra; |
$result .= '<title> LON-CAPA '.&mt($title).'</title>'.$head_extra; |
|
|
return $result; |
return $result; |
} |
} |
|
|
Line 3094 sub start_page {
|
Line 3093 sub start_page {
|
my %head_args; |
my %head_args; |
foreach my $arg ('redirect','force_register') { |
foreach my $arg ('redirect','force_register') { |
if (defined($args->{$arg})) { |
if (defined($args->{$arg})) { |
$head_args{$arg} = $args->{$args}; |
$head_args{$arg} = $args->{$arg}; |
} |
} |
} |
} |
|
|
Line 3150 sub end_page {
|
Line 3149 sub end_page {
|
sub html_encode { |
sub html_encode { |
my ($result) = @_; |
my ($result) = @_; |
|
|
$result = &HTML::Entities::encode($result,'"'); |
$result = &HTML::Entities::encode($result,'<>&"'); |
|
|
return $result; |
return $result; |
} |
} |
sub js_ready { |
sub js_ready { |
my ($result) = @_; |
my ($result) = @_; |
|
|
$result =~ s/[\n\r]/ /g; |
$result =~ s/[\n\r]/ /xmsg; |
$result =~ s/'/\\'/g; |
$result =~ s/\\/\\\\/xmsg; |
|
$result =~ s/'/\\'/xmsg; |
|
$result =~ s{</script>}{</scrip'+'t>}xmsg; |
|
|
return $result; |
return $result; |
} |
} |