Code

inserted tidy
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 24 Jun 2005 09:14:29 +0000 (09:14 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 24 Jun 2005 09:14:29 +0000 (09:14 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@833 594d385d-05f5-0310-b6e9-bd551577e9d8

html/main.php

index fc69a2c031000744a1fdb71c8f1994233c4cf447..81d9f4bf623e4d23e777f0960b6fce7935d88df3 100644 (file)
@@ -287,22 +287,18 @@ if (isset($config->data['MAIN']['W3CTEST']) && preg_match('/true/i', $config->da
   $config = array('indent' => TRUE,
                'output-xhtml' => TRUE,
                'wrap' => 200);
-
-  $tidy = tidy_parse_string($display, $config, 'UTF8');
-  tidy_clean_repair($tidy);
-//$tidy->diagnose();
-  $cnt =  tidy_error_count($tidy);
-//  if($cnt != 0){
-    echo nl2br(htmlentities($tidy->errorBuffer));
-//    }
-  tidy_clean_repair($tidy);
-
-echo $tidy;
-}else{
-  /* Show page... */
-  echo $display;
+  $display = tidy_parse_string($display, $config, 'UTF8');
+  tidy_clean_repair($display);
+  $cnt =  (tidy_error_count($display))+(tidy_warning_count($display));
+  if($cnt != 0){
+    echo nl2br(htmlentities($display->errorBuffer));
+  }
+  tidy_clean_repair($display);
 }
 
+/* Show page... */
+echo $display;
+
 /* Save plist */
 $_SESSION['plist']= $plist;