Index: /MediaWiki/trunk/FCKeditor.body.php
===================================================================
--- /MediaWiki/trunk/FCKeditor.body.php	(revision 3183)
+++ /MediaWiki/trunk/FCKeditor.body.php	(revision 3184)
@@ -327,5 +327,5 @@
 			$parser = new FCKeditorParser();
 			$parser->setOutputType(OT_HTML);
-			$form->textbox1 = $parser->parse($form->textbox1, $wgTitle, $options)->getText();
+			$form->textbox1 = preg_replace("/\n<\!-- Tidy found serious XHTML errors -->\n$/", "", $parser->parse($form->textbox1, $wgTitle, $options)->getText());
 		}
 
Index: /MediaWiki/trunk/FCKeditorSajax.body.php
===================================================================
--- /MediaWiki/trunk/FCKeditorSajax.body.php	(revision 3183)
+++ /MediaWiki/trunk/FCKeditorSajax.body.php	(revision 3184)
@@ -173,5 +173,5 @@
 
 	wfSajaxToggleFCKeditor('show');		//FCKeditor was switched to visible
-	return $parser->parse($wiki, $wgTitle, $options)->getText();
+	return preg_replace("/\n<\!-- Tidy found serious XHTML errors -->\n$/", "", $parser->parse($wiki, $wgTitle, $options)->getText());
 }
 function wfSajaxToggleFCKeditor($data) {
