From: hickert Date: Fri, 24 Jun 2005 09:09:24 +0000 (+0000) Subject: integrated tidy X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2d079631810211e8eaa2f33aef7a8b45d2296347;p=gosa.git integrated tidy git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@832 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/html/main.php b/html/main.php index fe4448f29..fc69a2c03 100644 --- a/html/main.php +++ b/html/main.php @@ -279,11 +279,29 @@ $display= $header.$smarty->fetch(get_template_path('framework.tpl')); /* For development, perform a W3C conformance check if specified in gosa.conf */ if (isset($config->data['MAIN']['W3CTEST']) && preg_match('/true/i', $config->data['MAIN']['W3CTEST'])) { -# $display= ""; -} -/* Show page... */ -echo $display; + /* Use PHP tidy for debugging */ + // Specify configuration + + $tidy = new tidy(); + $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; +} /* Save plist */ $_SESSION['plist']= $plist;