X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fcore%2Fhtmlparser%2Ffragment.js;h=f94f4e917d242c61b6e99e942495f852abae6868;hp=7912569d05a86e5740713b79cc4238acd5dd152e;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hpb=9afde8772159bd3436f1f5b7862960307710ae5a diff --git a/_source/core/htmlparser/fragment.js b/_source/core/htmlparser/fragment.js index 7912569..f94f4e9 100644 --- a/_source/core/htmlparser/fragment.js +++ b/_source/core/htmlparser/fragment.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 */ @@ -118,7 +118,7 @@ CKEDITOR.htmlParser.fragment = function() { target = target || currentNode || fragment; - // If the target is the fragment and this element can't go inside + // If the target is the fragment and this inline element can't go inside // body (if fixForBody). if ( fixForBody && !target.type ) { @@ -129,9 +129,8 @@ CKEDITOR.htmlParser.fragment = function() elementName = realElementName; else elementName = element.name; - if ( elementName - && !( elementName in CKEDITOR.dtd.$body ) - && !( elementName in CKEDITOR.dtd.$nonBodyContent ) ) + + if ( elementName && elementName in CKEDITOR.dtd.$inline ) { var savedCurrent = currentNode; @@ -392,6 +391,7 @@ CKEDITOR.htmlParser.fragment = function() parser.onComment = function( comment ) { + sendPendingBRs(); checkPending(); currentNode.add( new CKEDITOR.htmlParser.comment( comment ) ); };