--- loncom/interface/lonhtmlcommon.pm 2006/02/22 19:22:49 1.121
+++ loncom/interface/lonhtmlcommon.pm 2006/05/12 16:45:41 1.128
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.121 2006/02/22 19:22:49 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.128 2006/05/12 16:45:41 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -178,6 +178,7 @@ sub get_recent {
sub textbox {
my ($name,$value,$size,$special) = @_;
$size = 40 if (! defined($size));
+ $value = &HTML::Entities::encode($value,'<>&"');
my $Str = '';
return $Str;
@@ -524,7 +525,7 @@ sub get_date_from_form {
if (($year<70) || ($year>137)) { return undef; }
if (defined($sec) && defined($min) && defined($hour) &&
defined($day) && defined($month) && defined($year) &&
- eval(&timelocal($sec,$min,$hour,$day,$month,$year))) {
+ eval('&timelocal($sec,$min,$hour,$day,$month,$year)')) {
return &timelocal($sec,$min,$hour,$day,$month,$year);
} else {
return undef;
@@ -803,20 +804,25 @@ sub Create_PrgWin {
$prog_state{'type'}=$type;
if ($type eq 'popup') {
$prog_state{'window'}='popwin';
- my $html=&Apache::lonxml::xmlbegin();
+ my $start_page =
+ &Apache::loncommon::start_page($title,undef,
+ {'only_body' => 1,
+ 'bgcolor' => '#88DDFF',
+ 'js_ready' => 1});
+ my $end_page = &Apache::loncommon::end_page({'js_ready' => 1});
+
#the whole function called through timeout is due to issues
#in mozilla Read BUG #2665 if you want to know the whole story
- &r_print($r,'");
$prog_state{'formname'}='popremain';
@@ -974,7 +980,14 @@ sub crumbs {
# --------------------- A function that generates a window for the spellchecker
sub spellheader {
- my $html=&Apache::lonxml::xmlbegin();
+ my $start_page=
+ &Apache::loncommon::start_page('Speller Suggestions',undef,
+ {'only_body' => 1,
+ 'js_ready' => 1,
+ 'bgcolor' => '#DDDDDD',});
+ my $end_page=
+ &Apache::loncommon::end_page({'js_ready' => 1});
+
my $nothing=&javascript_nothing();
return (<
@@ -983,7 +996,7 @@ var checkwin;
function spellcheckerwindow() {
checkwin=window.open($nothing,'spellcheckwin','height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no');
- checkwin.document.writeln('$html