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

www lon-capa-cvs-allow@mail.lon-capa.org
Fri, 07 Mar 2008 21:17:07 -0000


www		Fri Mar  7 16:17:07 2008 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  Bug #3381: stop people from publishing broken HTML files
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.472 loncom/xml/lonxml.pm:1.473
--- loncom/xml/lonxml.pm:1.472	Fri Mar  7 15:49:17 2008
+++ loncom/xml/lonxml.pm	Fri Mar  7 16:17:04 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.472 2008/03/07 20:49:17 www Exp $
+# $Id: lonxml.pm,v 1.473 2008/03/07 21:17:04 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -379,6 +379,10 @@
  }
  &init_state();
  if ($env{'form.return_only_error_and_warning_counts'}) {
+     if ($env{'request.filename'}=~/\.(html|htm|xml)$/i) { 
+        my $error=&verify_html($content_file_string);
+        if ($error) { $errorcount++; }
+     }
      return "$errorcount:$warningcount";
  }
  return $finaloutput;