Index: _source/core/dom/walker.js =================================================================== --- _source/core/dom/walker.js (revision 6348) +++ _source/core/dom/walker.js (revision ) @@ -430,17 +430,23 @@ }; var tailNbspRegex = /^[\t\r\n ]*(?: |\xa0)$/, - isNotWhitespaces = CKEDITOR.dom.walker.whitespaces( 1 ), - isNotBookmark = CKEDITOR.dom.walker.bookmark( 0, 1 ), - fillerEvaluator = function( element ) + isWhitespaces = CKEDITOR.dom.walker.whitespaces(), + isBookmark = CKEDITOR.dom.walker.bookmark(), + toSkip = function( node ) { - return isNotBookmark( element ) && isNotWhitespaces( element ); + return isBookmark( node ) + || isWhitespaces( node ) + || node.type == CKEDITOR.NODE_ELEMENT && node.getName() in CKEDITOR.dtd.$removeEmpty; }; // Check if there's a filler node at the end of an element, and return it. CKEDITOR.dom.element.prototype.getBogus = function() { - var tail = this.getLast( fillerEvaluator ); + // Bogus are not always at the block end, e.g.
text