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