};\r
};\r
\r
- CKEDITOR.dom.walker.bogus = function( type, isReject )\r
+ CKEDITOR.dom.walker.bogus = function( isReject )\r
{\r
function nonEmpty( node )\r
{\r
\r
return function( node )\r
{\r
- var parent = node.getParent(),\r
- isBogus = !CKEDITOR.env.ie ? node.is && node.is( 'br' ) :\r
+ var isBogus = !CKEDITOR.env.ie ? node.is && node.is( 'br' ) :\r
node.getText && tailNbspRegex.test( node.getText() );\r
\r
- isBogus = isBogus && parent.isBlockBoundary() && !!parent.getLast( nonEmpty );\r
+ if ( isBogus )\r
+ {\r
+ var parent = node.getParent(), next = node.getNext( nonEmpty );\r
+ isBogus = parent.isBlockBoundary() &&\r
+ ( !next ||\r
+ next.type == CKEDITOR.NODE_ELEMENT &&\r
+ next.isBlockBoundary() );\r
+ }\r
\r
return !! ( isReject ^ isBogus );\r
};\r