JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.5.3
[ckeditor.git] / _source / core / htmlparser / element.js
index 533262e..84a452e 100644 (file)
@@ -34,7 +34,7 @@ CKEDITOR.htmlParser.element = function( name, attributes )
         */\r
        this.children = [];\r
 \r
-       var tagName = attributes[ 'data-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
@@ -127,7 +127,7 @@ CKEDITOR.htmlParser.element = function( name, attributes )
                                {\r
                                        var writer = new CKEDITOR.htmlParser.basicWriter();\r
                                        CKEDITOR.htmlParser.fragment.prototype.writeChildrenHtml.call( element, writer, filter );\r
-                                       element.children = new CKEDITOR.htmlParser.fragment.fromHtml( writer.getHtml() ).children;\r
+                                       element.children = new CKEDITOR.htmlParser.fragment.fromHtml( writer.getHtml(), 0, element.clone() ).children;\r
                                        isChildrenFiltered = 1;\r
                                }\r
                        };\r