Index: /FCKeditor/trunk/editor/_source/internals/fckxhtml_gecko.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fckxhtml_gecko.js	(revision 916)
+++ /FCKeditor/trunk/editor/_source/internals/fckxhtml_gecko.js	(revision 917)
@@ -69,2 +69,37 @@
 	}
 }
+
+if ( FCKBrowserInfo.IsOpera )
+{
+	// Opera moves the <FCK:meta> element outside head (#1166).
+	
+	// Save a reference to the XML <head> node, so we can use it for
+	// orphan <meta>s.
+	FCKXHtml.TagProcessors['head'] = function( node, htmlNode )
+	{
+		FCKXHtml.XML._HeadElement = node ;
+		
+		node = FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
+
+		return node ;
+	}
+
+	// Check whether a <meta> element is outside <head>, and move it to the
+	// proper place.
+	FCKXHtml.TagProcessors['meta'] = function( node, htmlNode, xmlNode )
+	{
+		if ( htmlNode.parentNode.nodeName.toLowerCase() != 'head' )
+		{
+			var headElement = FCKXHtml.XML._HeadElement ;
+			
+			if ( headElement && xmlNode != headElement )
+			{
+				delete htmlNode._fckxhtmljob ;
+				FCKXHtml._AppendNode( headElement, htmlNode ) ;
+				return null ;
+			}
+		}
+
+		return node ;
+	}
+}
