JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.5.1
[ckeditor.git] / _source / core / htmlparser / fragment.js
index 7912569..f94f4e9 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
@@ -118,7 +118,7 @@ CKEDITOR.htmlParser.fragment = function()
                {\r
                        target = target || currentNode || fragment;\r
 \r
-                       // If the target is the fragment and this element can't go inside\r
+                       // If the target is the fragment and this inline element can't go inside\r
                        // body (if fixForBody).\r
                        if ( fixForBody && !target.type )\r
                        {\r
@@ -129,9 +129,8 @@ CKEDITOR.htmlParser.fragment = function()
                                        elementName = realElementName;\r
                                else\r
                                        elementName =  element.name;\r
-                               if ( elementName\r
-                                               && !( elementName in CKEDITOR.dtd.$body )\r
-                                               && !( elementName in CKEDITOR.dtd.$nonBodyContent )  )\r
+\r
+                               if ( elementName && elementName in CKEDITOR.dtd.$inline )\r
                                {\r
                                        var savedCurrent = currentNode;\r
 \r
@@ -392,6 +391,7 @@ CKEDITOR.htmlParser.fragment = function()
 \r
                parser.onComment = function( comment )\r
                {\r
+                       sendPendingBRs();\r
                        checkPending();\r
                        currentNode.add( new CKEDITOR.htmlParser.comment( comment ) );\r
                };\r