+ return !! ( isReject ^ isInvisible );\r
+ };\r
+ };\r
+\r
+ CKEDITOR.dom.walker.nodeType = function( type, isReject )\r
+ {\r
+ return function( node )\r
+ {\r
+ return !! ( isReject ^ ( node.type == type ) );\r
+ };\r
+ };\r
+\r
+ CKEDITOR.dom.walker.bogus = function( isReject )\r
+ {\r
+ function nonEmpty( node )\r
+ {\r
+ return !isWhitespaces( node ) && !isBookmark( node );\r
+ }\r
+\r
+ return function( node )\r
+ {\r
+ var isBogus = !CKEDITOR.env.ie ? node.is && node.is( 'br' ) :\r
+ node.getText && tailNbspRegex.test( node.getText() );\r
+\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