From: Ævar Arnfjörð Bjarmason Date: Sat, 18 Jun 2005 01:13:46 +0000 (+0000) Subject: * Moved $text alteration statement, should only be used when we're not X-Git-Tag: 1.5.0beta1~173 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=52c18763b95fcb1546fee85cbf45cd377529c110;p=lhc%2Fweb%2Fwiklou.git * Moved $text alteration statement, should only be used when we're not stripping comments. --- 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"; }