Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 7526)
+++ /CKEditor/trunk/CHANGES.html	(revision 7527)
@@ -68,4 +68,5 @@
 		<li><a href="http://dev.ckeditor.com/ticket/9063">#9063</a> : Styles on sub-list are lost when decreasing indent of the parent list.</li>
 		<li><a href="http://dev.ckeditor.com/ticket/8855">#8855</a> : [Chrome] Popup plugin is broken in latest Chrome versions.</li>
+		<li><a href="http://dev.ckeditor.com/ticket/9047">#9047</a> : [Firefox] Anchors in the preview window will now work properly.</li>
 	</ul>
 	<h3>
Index: /CKEditor/trunk/_source/plugins/preview/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/preview/plugin.js	(revision 7526)
+++ /CKEditor/trunk/_source/plugins/preview/plugin.js	(revision 7527)
@@ -10,4 +10,6 @@
 (function()
 {
+	var pluginPath;
+
 	var previewCmd =
 	{
@@ -80,8 +82,16 @@
 			}
 
+			// With Firefox only, we need to open a special preview page, so
+			// anchors will work properly on it. (#9047)
+			if ( CKEDITOR.env.gecko )
+			{
+				window._cke_htmlToLoad = sHTML;
+				sOpenUrl = pluginPath + 'preview.html';
+			}
+
 			var oWindow = window.open( sOpenUrl, null, 'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=' +
 				iWidth + ',height=' + iHeight + ',left=' + iLeft );
 
-			if ( !isCustomDomain )
+			if ( !isCustomDomain && !CKEDITOR.env.gecko )
 			{
 				var doc = oWindow.document;
@@ -103,4 +113,6 @@
 		init : function( editor )
 		{
+			pluginPath = this.path;
+
 			editor.addCommand( pluginName, previewCmd );
 			editor.ui.addButton( 'Preview',
Index: /CKEditor/trunk/_source/plugins/preview/preview.html
===================================================================
--- /CKEditor/trunk/_source/plugins/preview/preview.html	(revision 7527)
+++ /CKEditor/trunk/_source/plugins/preview/preview.html	(revision 7527)
@@ -0,0 +1,10 @@
+﻿<script>
+
+var doc = document;
+doc.open();
+doc.write( window.opener._cke_htmlToLoad );
+doc.close();
+
+delete window.opener._cke_htmlToLoad;
+
+</script>
