Index: trunk/phase3/includes/Parser.php |
— | — | @@ -417,11 +417,6 @@ |
418 | 418 | $text = $this->replaceVariables( $text ); |
419 | 419 | |
420 | 420 | # $text = preg_replace( "/(^|\n)-----*/", "\\1<hr>", $text ); |
421 | | - $text = str_replace ( "<HR>", "<hr />", $text ); |
422 | | - $text = str_replace ( "<br>", "<br />", $text ); |
423 | | - $text = str_replace ( "<br >", "<br />", $text ); |
424 | | - $text = str_replace ( '<center>', '<span style="text-align: center">', $text ); |
425 | | - $text = str_replace ( '</center>', '</span>', $text ); |
426 | 421 | |
427 | 422 | $text = $this->doHeadings( $text ); |
428 | 423 | |
— | — | @@ -438,6 +433,13 @@ |
439 | 434 | |
440 | 435 | $sk =& $this->mOptions->getSkin(); |
441 | 436 | $text = $sk->transformContent( $text ); |
| 437 | + $fixtags = array( |
| 438 | + "/<hr *>/i" => '<hr/>', |
| 439 | + "/<br *>/i" => '<br/>', |
| 440 | + "/<center *>/i"=>'<span style="text-align:center;">', |
| 441 | + "/<\\/center *>/i" => '</span>' |
| 442 | + ); |
| 443 | + $text = preg_replace( array_keys($fixtags), array_values($fixtags), $text ); |
442 | 444 | $text = $this->doBlockLevels( $text, $linestart ); |
443 | 445 | $text .= $this->categoryMagic () ; |
444 | 446 | |
— | — | @@ -1272,7 +1274,7 @@ |
1273 | 1275 | $htmlpairs = array( # Tags that must be closed |
1274 | 1276 | "b", "i", "u", "font", "big", "small", "sub", "sup", "h1", |
1275 | 1277 | "h2", "h3", "h4", "h5", "h6", "cite", "code", "em", "s", |
1276 | | - "strike", "strong", "tt", "var", "div", "span", |
| 1278 | + "strike", "strong", "tt", "var", "div", "center", |
1277 | 1279 | "blockquote", "ol", "ul", "dl", "table", "caption", "pre", |
1278 | 1280 | "ruby", "rt" , "rb" , "rp", "p" |
1279 | 1281 | ); |