JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.5.1
[ckeditor.git] / _source / core / htmlparser / element.js
index b66fcfa..533262e 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
@@ -36,9 +36,18 @@ CKEDITOR.htmlParser.element = function( name, attributes )
 \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