Index: /CKEditor/trunk/_source/core/dom/range.js
===================================================================
--- /CKEditor/trunk/_source/core/dom/range.js	(revision 6390)
+++ /CKEditor/trunk/_source/core/dom/range.js	(revision 6391)
@@ -824,5 +824,10 @@
 		},
 
-		enlarge : function( unit )
+		/**
+		 * Expands the range so that partial units are completely contained.
+		 * @param unit {Number} The unit type to expand with.
+		 * @param {Boolean} [excludeBrs=false] Whether include line-breaks when expanding.
+		 */
+		enlarge : function( unit, excludeBrs )
 		{
 			switch ( unit )
@@ -945,5 +950,6 @@
 								// We need to check for the bookmark attribute because IE insists on
 								// rendering the display:none nodes we use for bookmarks. (#3363)
-								if ( sibling.$.offsetWidth > 0 && !sibling.data( 'cke-bookmark' ) )
+								// Line-breaks (br) are rendered with zero width, which we don't want to include. (#7041)
+								if ( ( sibling.$.offsetWidth > 0 || excludeBrs && sibling.is( 'br' ) ) && !sibling.data( 'cke-bookmark' ) )
 								{
 									// We'll accept it only if we need
@@ -1080,13 +1086,5 @@
 									endTop = enlargeable;
 								else if ( enlargeable )
-								{
-									var bogus = enlargeable.isBlockBoundary() && enlargeable.getBogus();
-
-									// Exclude bogus <br /> at the end of block.
-									if ( bogus )
-										this.setEndBefore( bogus );
-									else
-										this.setEndAfter( enlargeable );
-								}
+									this.setEndAfter( enlargeable );
 							}
 
@@ -1112,5 +1110,6 @@
 								// We need to check for the bookmark attribute because IE insists on
 								// rendering the display:none nodes we use for bookmarks. (#3363)
-								if ( sibling.$.offsetWidth > 0 && !sibling.data( 'cke-bookmark' ) )
+								// Line-breaks (br) are rendered with zero width, which we don't want to include. (#7041)
+								if ( ( sibling.$.offsetWidth > 0 || excludeBrs && sibling.is( 'br' ) ) && !sibling.data( 'cke-bookmark' ) )
 								{
 									// We'll accept it only if we need
Index: /CKEditor/trunk/_source/core/dom/walker.js
===================================================================
--- /CKEditor/trunk/_source/core/dom/walker.js	(revision 6390)
+++ /CKEditor/trunk/_source/core/dom/walker.js	(revision 6391)
@@ -437,5 +437,7 @@
 			return isBookmark( node )
 					|| isWhitespaces( node )
-					|| node.type == CKEDITOR.NODE_ELEMENT && node.getName() in CKEDITOR.dtd.$removeEmpty;
+					|| node.type == CKEDITOR.NODE_ELEMENT
+					&& node.getName() in CKEDITOR.dtd.$inline
+					&& !( node.getName() in CKEDITOR.dtd.$empty );
 		};
 
@@ -443,5 +445,5 @@
 	CKEDITOR.dom.element.prototype.getBogus = function()
 	{
-		// Bogus are not always at the end, e.g. <p><strong>text<br /></strong></p> (#7070).
+		// Bogus are not always at the end, e.g. <p><a>text<br /></a></p> (#7070).
 		var tail = this;
 		do { tail = tail.getPreviousSourceNode(); }
Index: /CKEditor/trunk/_source/plugins/styles/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/styles/plugin.js	(revision 6390)
+++ /CKEditor/trunk/_source/plugins/styles/plugin.js	(revision 6391)
@@ -431,5 +431,5 @@
 
 		// Expand the range.
-		range.enlarge( CKEDITOR.ENLARGE_ELEMENT );
+		range.enlarge( CKEDITOR.ENLARGE_ELEMENT, 1 );
 		range.trim();
 
@@ -658,5 +658,5 @@
 		 * that our operation logic can be simpler.
 		 */
-		range.enlarge( CKEDITOR.ENLARGE_ELEMENT );
+		range.enlarge( CKEDITOR.ENLARGE_ELEMENT, 1 );
 
 		var bookmark = range.createBookmark(),
