- global $wgUseTidy;
- if(!$wgUseTidy) {
- $fixtags = array(
- # french spaces, last one Guillemet-left
- # only if there is something before the space
- '/(.) (?=\\?|:|;|!|\\302\\273)/' => '\\1 \\2',
- # french spaces, Guillemet-right
- '/(\\302\\253) /' => '\\1 ',
- '/<hr *>/i' => '<hr />',
- '/<br *>/i' => '<br />',
- '/<center *>/i' => '<div class="center">',
- '/<\\/center *>/i' => '</div>',
- );
- $text = preg_replace( array_keys($fixtags), array_values($fixtags), $text );
- $text = Sanitizer::normalizeCharReferences( $text );
- } else {
- $fixtags = array(
- # french spaces, last one Guillemet-left
- '/ (\\?|:|;|!|\\302\\273)/' => ' \\1',
- # french spaces, Guillemet-right
- '/(\\302\\253) /' => '\\1 ',
- '/<center *>/i' => '<div class="center">',
- '/<\\/center *>/i' => '</div>'
- );
- $text = preg_replace( array_keys($fixtags), array_values($fixtags), $text );
- }
+ $fixtags = array(
+ # french spaces, last one Guillemet-left
+ # only if there is something before the space
+ '/(.) (?=\\?|:|;|!|\\302\\273)/' => '\\1 \\2',
+ # french spaces, Guillemet-right
+ '/(\\302\\253) /' => '\\1 ',
+ '/<hr *>/i' => '<hr />',
+ '/<br *>/i' => '<br />',
+ '/<center *>/i' => '<div class="center">',
+ '/<\\/center *>/i' => '</div>',
+ );
+ $text = preg_replace( array_keys($fixtags), array_values($fixtags), $text );
+ $text = Sanitizer::normalizeCharReferences( $text );
+