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

raeburn raeburn@source.lon-capa.org
Fri, 20 Mar 2009 20:59:54 -0000


raeburn		Fri Mar 20 20:59:54 2009 EDT

  Modified files:              (Branch: version_2_8_X)
    /loncom/xml	lonxml.pm 
  Log:
  - Backport 1.491.
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.484.4.1 loncom/xml/lonxml.pm:1.484.4.2
--- loncom/xml/lonxml.pm:1.484.4.1	Thu Dec 11 22:19:45 2008
+++ loncom/xml/lonxml.pm	Fri Mar 20 20:59:54 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.484.4.1 2008/12/11 22:19:45 raeburn Exp $
+# $Id: lonxml.pm,v 1.484.4.2 2009/03/20 20:59:54 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1587,9 +1587,12 @@
       my $spelllink .=&Apache::lonhtmlcommon::spelllink('xmledit','filecont');
       my $textarea_events = &Apache::edit::element_change_detection();
       my $form_events     = &Apache::edit::form_change_detection();
-      my $htmlerror=&verify_html($filecontents);
-      if ($htmlerror) {
-         $htmlerror='<span class="LC_error">'.$htmlerror.'</span>';
+      my $htmlerror;
+      if ($filetype eq 'html') {
+          $htmlerror=&verify_html($filecontents);
+          if ($htmlerror) {
+              $htmlerror='<span class="LC_error">'.$htmlerror.'</span>';
+          }
       }
       my $editfooter=(<<ENDFOOTER);
 $initialize