JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.5.1
[ckeditor.git] / _source / core / editor_basic.js
index 7b2d54a..8d109c8 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 \r
@@ -98,6 +98,10 @@ if ( !CKEDITOR.editor )
                        // Look for the element by id. We accept any kind of element here.\r
                        element = document.getElementById( elementOrIdOrName );\r
 \r
+                       // Elements that should go into head are unacceptable (#6791).\r
+                       if ( element && element.tagName.toLowerCase() in {style:1,script:1,base:1,link:1,meta:1,title:1} )\r
+                               element = null;\r
+\r
                        // If not found, look for elements by name. In this case we accept only\r
                        // textareas.\r
                        if ( !element )\r