[LON-CAPA-cvs] cvs: loncom /homework edit.pm lonhomework.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 30 Mar 2004 08:20:49 -0000


albertel		Tue Mar 30 03:20:49 2004 EDT

  Modified files:              
    /loncom/homework	edit.pm lonhomework.pm 
  Log:
  - more changes for utf8 transparency
  
  
Index: loncom/homework/edit.pm
diff -u loncom/homework/edit.pm:1.80 loncom/homework/edit.pm:1.81
--- loncom/homework/edit.pm:1.80	Tue Feb 17 17:02:43 2004
+++ loncom/homework/edit.pm	Tue Mar 30 03:20:49 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # edit mode helpers
 #
-# $Id: edit.pm,v 1.80 2004/02/17 22:02:43 albertel Exp $
+# $Id: edit.pm,v 1.81 2004/03/30 08:20:49 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -475,7 +475,7 @@
 
 sub editline {
     my ($tag,$data,$description,$size)=@_;
-    $data=&HTML::Entities::encode($data);
+    $data=&HTML::Entities::encode($data,'<>&"');
     if ($description) { $description="<br />".$description."<br />"; }
     my $result = <<"END";
 $description
@@ -496,7 +496,7 @@
     return $description."\n".'&nbsp;&nbsp;&nbsp;<textarea rows="'.$rows.
 	'" cols="'.$cols.'" name="homework_edit_'.
 	$Apache::lonxml::curdepth.'">'.
-	&HTML::Entities::encode($data).'</textarea>'."\n";
+	&HTML::Entities::encode($data,'<>&"').'</textarea>'."\n";
 }
 
 sub modifiedfield {
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.171 loncom/homework/lonhomework.pm:1.172
--- loncom/homework/lonhomework.pm:1.171	Tue Mar  9 15:37:58 2004
+++ loncom/homework/lonhomework.pm	Tue Mar 30 03:20:49 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.171 2004/03/09 20:37:58 albertel Exp $
+# $Id: lonhomework.pm,v 1.172 2004/03/30 08:20:49 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -564,7 +564,7 @@
             <hr />
             ' . $xml_help . '
             <textarea rows="'.$rows.'" cols="'.$cols.'" name="editxmltext">'.
-	    &HTML::Entities::encode($problem).'</textarea>
+	    &HTML::Entities::encode($problem,'<>&"').'</textarea>
             </form></body></html>';
 	&Apache::lonxml::add_messages(\$result);
 	$request->print($result);