[LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm lonsearchcat.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 12 May 2006 16:45:43 -0000
albertel Fri May 12 12:45:43 2006 EDT
Modified files:
/loncom/interface lonhtmlcommon.pm lonsearchcat.pm
Log:
- make htmlcommon's text box encode the values
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.127 loncom/interface/lonhtmlcommon.pm:1.128
--- loncom/interface/lonhtmlcommon.pm:1.127 Mon May 1 15:28:21 2006
+++ loncom/interface/lonhtmlcommon.pm Fri May 12 12:45:41 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.127 2006/05/01 19:28:21 albertel 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 textbox {
my ($name,$value,$size,$special) = @_;
$size = 40 if (! defined($size));
+ $value = &HTML::Entities::encode($value,'<>&"');
my $Str = '<input type="text" name="'.$name.'" size="'.$size.'" '.
'value="'.$value.'" '.$special.' />';
return $Str;
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.263 loncom/interface/lonsearchcat.pm:1.264
--- loncom/interface/lonsearchcat.pm:1.263 Mon May 1 15:37:34 2006
+++ loncom/interface/lonsearchcat.pm Fri May 12 12:45:41 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Search Catalog
#
-# $Id: lonsearchcat.pm,v 1.263 2006/05/01 19:37:34 albertel Exp $
+# $Id: lonsearchcat.pm,v 1.264 2006/05/12 16:45:41 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -703,10 +703,8 @@
}
$scrout.='<table>'.
'<tr><td align="center" valign="top">'.
- &Apache::lonhtmlcommon::textbox
- ('basicexp',
- &HTML::Entities::encode($env{'form.basicexp'},'<>&"'),50
- ).
+ &Apache::lonhtmlcommon::textbox('basicexp',
+ $env{'form.basicexp'},50).
'<br />'.
'<font size="-1">'.&searchhelp().'</font>'.'</td>'.
'<td><font size="-1">'.