Fix bug 5497: Regression in HTML normalization in 1.6 (unclosed <li>)
authorAntoine Musso <hashar@users.mediawiki.org>
Mon, 24 Apr 2006 19:25:14 +0000 (19:25 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Mon, 24 Apr 2006 19:25:14 +0000 (19:25 +0000)
parsertest still at 292/303 :o)

RELEASE-NOTES
includes/Sanitizer.php

index 4c6cf3e..82a34f9 100644 (file)
@@ -115,6 +115,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   This sort of special casing should be removed and fixed properly.
 * Remove useless whitespace from Special:Brokenredirects header
 * Treat "allmessagesnotsupporteddb" as wikitext when echoing; change default text
+* (bug 5497) regeression in HTML normalization in 1.6 (unclosed <li>,<dd>,<dt>)
 
 == Compatibility ==
 
index ca6f164..21ea4d9 100644 (file)
@@ -404,6 +404,9 @@ class Sanitizer {
                                                } elseif( in_array( $t, $htmlsingleonly ) ) {
                                                        # Hack to force empty tag for uncloseable elements
                                                        $brace = '/>';
+                                               } else if( in_array( $t, $htmlsingle ) ) {
+                                                       # Hack to not close $htmlsingle tags
+                                                       $brace = NULL;
                                                } else {
                                                        if ( $t == 'table' ) {
                                                                array_push( $tablestack, $tagstack );