X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fcore%2Feditor_basic.js;h=8d109c82de9524df7dca1dbbcabf4787ca792353;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hp=ec90bf72107e7834fc36ae5657487f0b467d3ab1;hpb=e7789c1ad838194d45eeee6ac2eb6e55f5cf35a1;p=ckeditor.git diff --git a/_source/core/editor_basic.js b/_source/core/editor_basic.js index ec90bf7..8d109c8 100644 --- a/_source/core/editor_basic.js +++ b/_source/core/editor_basic.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -27,15 +27,15 @@ if ( !CKEDITOR.editor ) CKEDITOR.ELEMENT_MODE_APPENDTO = 2; /** - * Represents an editor instance. This constructor should be rarely used, - * being the {@link CKEDITOR} methods preferible. - * @constructor + * Creates an editor class instance. This constructor should be rarely + * used, in favor of the {@link CKEDITOR} editor creation functions. + * @ class Represents an editor instance. * @param {Object} instanceConfig Configuration values for this specific * instance. * @param {CKEDITOR.dom.element} [element] The element linked to this * instance. * @param {Number} [mode] The mode in which the element is linked to this - * instance. + * instance. See {@link #elementMode}. * @param {String} [data] Since 3.3. Initial value for the instance. * @augments CKEDITOR.event * @example @@ -54,11 +54,11 @@ if ( !CKEDITOR.editor ) * The mode in which the {@link #element} is linked to this editor * instance. It can be any of the following values: * * @name CKEDITOR.editor.prototype.elementMode @@ -98,6 +98,10 @@ if ( !CKEDITOR.editor ) // Look for the element by id. We accept any kind of element here. element = document.getElementById( elementOrIdOrName ); + // Elements that should go into head are unacceptable (#6791). + if ( element && element.tagName.toLowerCase() in {style:1,script:1,base:1,link:1,meta:1,title:1} ) + element = null; + // If not found, look for elements by name. In this case we accept only // textareas. if ( !element )