From 52c18763b95fcb1546fee85cbf45cd377529c110 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sat, 18 Jun 2005 01:13:46 +0000 Subject: [PATCH] * Moved $text alteration statement, should only be used when we're not stripping comments. --- includes/Parser.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index a910afe259..920d3d46f4 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -272,13 +272,13 @@ class Parser $params = array( ); } - // Hack to support short XML style tags - $text = preg_replace( "/<$tag(\\s+[^>]*|\\s*)\\/>/i", "<$tag\\1>", $text ); - if( $tag == STRIP_COMMENTS ) { $start = '//'; } else { + // Hack to support short XML style tags + $text = preg_replace( "/<$tag(\\s+[^>]*|\\s*)\\/>/i", "<$tag\\1>", $text ); + $start = "/<$tag(\\s+[^>]*|\\s*)>/i"; $end = "/<\\/$tag\\s*>/i"; } -- 2.20.1