From: Gabriel Wicke Date: Thu, 6 May 2004 13:38:23 +0000 (+0000) Subject: return the uncleaned text if tidy isn't there or if nothing is returned X-Git-Tag: 1.3.0beta1~135 X-Git-Url: http://git.cyclocoop.org/%22%20.%20%20%20%24self2%20.%20%20%20%22&var_mode_affiche=boucle?a=commitdiff_plain;h=3a4d20b02f8805e591bff47eb4d3346cc71d9883;p=lhc%2Fweb%2Fwiklou.git return the uncleaned text if tidy isn't there or if nothing is returned --- diff --git a/includes/Parser.php b/includes/Parser.php index 5c88ba3ed0..b39f704d96 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -421,7 +421,11 @@ class Parser fclose($pipes[1]); $return_value = proc_close($process); } - return preg_replace("/(^.*]*>|<\\/body[^>]*>.*$)/s", '', $cleansource); + if( $cleansource == '') { + return $text; + } else { + return preg_replace("/(^.*]*>|<\\/body[^>]*>.*$)/s", '', $cleansource); + } }