From d70f59f2c2e5e8976b4ed54cfe4344b326fed9cd Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 29 May 2004 04:51:29 +0000 Subject: [PATCH] quieter tidy errors --- includes/Parser.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/includes/Parser.php b/includes/Parser.php index 836e85aca0..0afa39daa8 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -419,6 +419,9 @@ class Parser function tidy ( $text ) { global $wgTidyConf, $wgTidyBin, $wgTidyOpts; global $wgInputEncoding, $wgOutputEncoding; + $fname = "Parser::tidy"; + wfProfileIn( $fname ); + $cleansource = ''; switch(strtoupper($wgOutputEncoding)) { case 'ISO-8859-1': @@ -449,8 +452,12 @@ class Parser fclose($pipes[1]); $return_value = proc_close($process); } + + wfProfileOut( $fname ); + if( $cleansource == '' && $text != '') { - return '

'.wfMsg('seriousxhtmlerrors').'

'.htmlspecialchars($text).'
'; + wfDebug( "Tidy error detected!\n" ); + return $text . "\n\n"; } else { return $cleansource; } -- 2.20.1