version 1.92, 2004/10/12 22:55:21
|
version 1.94, 2004/10/21 11:18:06
|
Line 131 sub select_recent {
|
Line 131 sub select_recent {
|
">\n<option value=''>--- ".&mt('Recent')." ---</option>"; |
">\n<option value=''>--- ".&mt('Recent')." ---</option>"; |
foreach (sort keys %recent) { |
foreach (sort keys %recent) { |
unless ($_=~/^error\:/) { |
unless ($_=~/^error\:/) { |
$return.="\n<option value='$_'>". |
my $escaped = &Apache::loncommon::escape_url($_); |
|
$return.="\n<option value='$escaped'>". |
&Apache::lonnet::unescape((split(/\&/,$recent{$_}))[1]). |
&Apache::lonnet::unescape((split(/\&/,$recent{$_}))[1]). |
'</option>'; |
'</option>'; |
} |
} |
Line 887 sub crumbs {
|
Line 888 sub crumbs {
|
unless ($path eq $uri) { $path.='/'; } |
unless ($path eq $uri) { $path.='/'; } |
my $linkpath=$path; |
my $linkpath=$path; |
if ($form) { |
if ($form) { |
$linkpath="javascript:$form.action='$path';$form.submit();"; |
my $escaped_path = &Apache::loncommon::escape_single($path); |
|
$linkpath="javascript:$form.action='$escaped_path';$form.submit();"; |
} |
} |
$output.='<a href="'.$linkpath.'"'.($target?' target="'.$target.'"':'').'>'.$_.'</a>/'; |
my $escaped_linkpath = &Apache::loncommon::escape_single($linkpath); |
|
my $escaped_target = &Apache::loncommon::escape_single($target); |
|
$output.='<a href="'.$escaped_linkpath.'"'.($target?' target="'.$escaped_target.'"':'').'>'.$_.'</a>/'; |
} |
} |
} else { |
} else { |
$output.=$uri; |
$output.=$uri; |
Line 976 sub disablelink {
|
Line 980 sub disablelink {
|
if (defined($#fields)) { |
if (defined($#fields)) { |
unless ($#fields>=0) { return ''; } |
unless ($#fields>=0) { return ''; } |
} |
} |
return '<a href="/adm/preferences?action=set_wysiwyg&wysiwyg=off&returnurl='.&Apache::lonnet::escape($ENV{'REQUEST_URI'}).'">'.&mt('Disable WYSIWYG Editor').'</a>'; |
return '<a href="'.&HTML::Entities::encode('/adm/preferences?action=set_wysiwyg&wysiwyg=off&returnurl=','<>&"').&Apache::lonnet::escape($ENV{'REQUEST_URI'}).'">'.&mt('Disable WYSIWYG Editor').'</a>'; |
} |
} |
|
|
sub enablelink { |
sub enablelink { |
Line 984 sub enablelink {
|
Line 988 sub enablelink {
|
if (defined($#fields)) { |
if (defined($#fields)) { |
unless ($#fields>=0) { return ''; } |
unless ($#fields>=0) { return ''; } |
} |
} |
return '<a href="/adm/preferences?action=set_wysiwyg&wysiwyg=on&returnurl='.&Apache::lonnet::escape($ENV{'REQUEST_URI'}).'">'.&mt('Enable WYSIWYG Editor').'</a>'; |
return '<a href="'.&HTML::Entities::encode('/adm/preferences?action=set_wysiwyg&wysiwyg=on&returnurl=','<>&"').&Apache::lonnet::escape($ENV{'REQUEST_URI'}).'">'.&mt('Enable WYSIWYG Editor').'</a>'; |
} |
} |
|
|
# ----------------------------------------- Script to activate only some fields |
# ----------------------------------------- Script to activate only some fields |