Mediawiki: Fix invalid XHTML ouput generated by includes/EditPage.php PROBLEM Invalid markup is created when previewing a page, e.g:

Note: Remember that this is only a preview, and has not yet been saved!

The XHTML specification does not allow
to occur inside of

. SOLUTION Replace

with

. APPLY THE PATCH cd mediawiki-1.4.x/ wget http://rbach.priv.at/Patches/mediawiki-20050715.diff patch -p0 < mediawiki-20050715.diff AUTHOR Robert Bachmann NOTES (added on 2005-07-17) This patch was submitted at 2005-07-15 18:51 UTC on http://bugzilla.wikimedia.org as "Bug 2870 - PATCH: Fix invalid XHTML ouput generated by includes/EditPage.php" It was marked as "SOLVED" but the patch was not applied to the code because of the following reason: > Comment #1 From JeLuF 2005-07-16 21:24 UTC > This is already fixed in MediaWiki 1.5. > The layout of that paragraph has been > moved to CSS. Unfortunatly at the time of this writting MediaWiki 1.5 is still a beta release. --- includes/EditPage.php 2005-05-27 13:18:20.000000000 +0200 +++ includes/EditPage.php 2005-07-15 17:17:06.111259200 +0200 @@ -451,8 +451,8 @@ $checkboxhtml = $minoredithtml . $watchhtml . '
'; if ( 'preview' == $formtype) { - $previewhead='

' . wfMsg( 'preview' ) . "

\n

" . - wfMsg( 'note' ) . wfMsg( 'previewnote' ) . "

\n"; + $previewhead='

' . wfMsg( 'preview' ) . "

\n

" . + wfMsg( 'note' ) . wfMsg( 'previewnote' ) . "

\n"; if ( $isConflict ) { $previewhead.='

' . wfMsg( 'previewconflict' ) . "

\n";