[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 30 Mar 2004 07:16:24 -0000


albertel		Tue Mar 30 02:16:24 2004 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  - utf-8 can do some funk-ass things to Perl
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.313 loncom/xml/lonxml.pm:1.314
--- loncom/xml/lonxml.pm:1.313	Mon Mar 22 19:47:48 2004
+++ loncom/xml/lonxml.pm	Tue Mar 30 02:16:24 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.313 2004/03/23 00:47:48 albertel Exp $
+# $Id: lonxml.pm,v 1.314 2004/03/30 07:16:24 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -967,7 +967,7 @@
 	    #never found the end tag ran out of text, throw error send back blank
 	    &error('Never found end tag for <'.$tag.
 		   '&gt; current string <pre>'.
-		   &HTML::Entities::encode($result).
+		   &HTML::Entities::encode($result,'<>&"').
 		   '</pre>');
 	    if ($gotfullstack) {
 		my $newstring='</'.$tag.'>'.$result;
@@ -1144,7 +1144,7 @@
 
 sub inserteditinfo {
       my ($result,$filecontents,$filetype)=@_;
-      $filecontents = &HTML::Entities::encode($filecontents);
+      $filecontents = &HTML::Entities::encode($filecontents,'<>&"');
 #      my $editheader='<a href="#editsection">Edit below</a><hr />';
       my $xml_help = '';
       if ($filetype eq 'html') {
@@ -1329,7 +1329,7 @@
 	$|=1;
 	my $request=$Apache::lonxml::request;
 	if (!$request) { $request=Apache->request; }
-	$request->print('<font size="-2"><pre>DEBUG:'.&HTML::Entities::encode($_[0])."</pre></font>\n");
+	$request->print('<font size="-2"><pre>DEBUG:'.&HTML::Entities::encode($_[0],'<>&"')."</pre></font>\n");
     }
 }