Ignore self closing on closing tags ( '</div />' now gives '</div>')

Fix parsertest "Don't fall for the self-closing div"
This commit is contained in:
Antoine Musso 2007-01-17 22:06:32 +00:00
parent dde90d01f2
commit 0692f639bc
2 changed files with 2 additions and 1 deletions

View file

@ -116,6 +116,7 @@ lighter making things easier to read.
* parserTests.php : removed the 'light' option for --color argument, replacing
it with a new global switch : $wgCommandLineDarkBg
* Sanitizer now correctly escapes lonely '>' occuring before the first wikitag.
* Ignore self closing on closing tags ( '</div />' now gives '</div>')
== Languages updated ==

View file

@ -476,7 +476,7 @@ class Sanitizer {
}
if ( ! $badtag ) {
$rest = str_replace( '>', '&gt;', $rest );
$close = ( $brace == '/>' ) ? ' /' : '';
$close = ( $brace == '/>' && !$slash ) ? ' /' : '';
$text .= "<$slash$t$newparams$close>$rest";
continue;
}