/*\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
*/\r
this.children = [];\r
\r
- var tagName = attributes._cke_real_element_type || name;\r
+ var tagName = attributes[ 'data-cke-real-element-type' ] || name;\r
+\r
+ // Reveal the real semantic of our internal custom tag name (#6639).\r
+ var internalTag = tagName.match( /^cke:(.*)/ );\r
+ internalTag && ( tagName = internalTag[ 1 ] );\r
\r
var dtd = CKEDITOR.dtd,\r
- isBlockLike = !!( dtd.$nonBodyContent[ tagName ] || dtd.$block[ tagName ] || dtd.$listItem[ tagName ] || dtd.$tableContent[ tagName ] || dtd.$nonEditable[ tagName ] || tagName == 'br' ),\r
- isEmpty = !!dtd.$empty[ name ];\r
+ isBlockLike = !!( dtd.$nonBodyContent[ tagName ]\r
+ || dtd.$block[ tagName ]\r
+ || dtd.$listItem[ tagName ]\r
+ || dtd.$tableContent[ tagName ]\r
+ || dtd.$nonEditable[ tagName ]\r
+ || tagName == 'br' ),\r
+ isEmpty = !!dtd.$empty[ name ];\r
\r
this.isEmpty = isEmpty;\r
this.isUnknown = !dtd[ name ];\r
*/\r
element.filterChildren = function()\r
{\r
- if( !isChildrenFiltered )\r
+ if ( !isChildrenFiltered )\r
{\r
var writer = new CKEDITOR.htmlParser.basicWriter();\r
CKEDITOR.htmlParser.fragment.prototype.writeChildrenHtml.call( element, writer, filter );\r
var attribsArray = [];\r
// Iterate over the attributes twice since filters may alter\r
// other attributes.\r
- for( var i = 0 ; i < 2; i++ )\r
+ for ( var i = 0 ; i < 2; i++ )\r
{\r
for ( a in attributes )\r
{\r
newAttrName = a;\r
value = attributes[ a ];\r
- if( i == 1 )\r
+ if ( i == 1 )\r
attribsArray.push( [ a, value ] );\r
else if ( filter )\r
{\r
delete attributes[ a ];\r
break;\r
}\r
- else if( newAttrName != a )\r
+ else if ( newAttrName != a )\r
{\r
delete attributes[ a ];\r
a = newAttrName;\r
else\r
break;\r
}\r
- if( newAttrName )\r
+ if ( newAttrName )\r
{\r
- if( ( value = filter.onAttribute( element, newAttrName, value ) ) === false )\r
+ if ( ( value = filter.onAttribute( element, newAttrName, value ) ) === false )\r
delete attributes[ newAttrName ];\r
else\r
attributes [ newAttrName ] = value;\r