From 3a4d20b02f8805e591bff47eb4d3346cc71d9883 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Thu, 6 May 2004 13:38:23 +0000 Subject: [PATCH] return the uncleaned text if tidy isn't there or if nothing is returned --- includes/Parser.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); + } } -- 2.20.1