Index: CKEditor/branches/versions/3.6.x/_samples/assets/_posteddata.php
===================================================================
--- CKEditor/branches/versions/3.6.x/_samples/assets/_posteddata.php	(revision 6819)
+++ CKEditor/branches/versions/3.6.x/_samples/assets/_posteddata.php	(revision 6821)
@@ -40,5 +40,5 @@
 ?>
 		<tr>
-			<th style="vertical-align: top"><?php echo $sForm?></th>
+			<th style="vertical-align: top"><?php echo htmlspecialchars($sForm); ?></th>
 			<td><pre class="samples"><?php echo $postedValue?></pre></td>
 		</tr>
Index: CKEditor/branches/versions/3.6.x/_source/core/ckeditor_base.js
===================================================================
--- CKEditor/branches/versions/3.6.x/_source/core/ckeditor_base.js	(revision 6819)
+++ CKEditor/branches/versions/3.6.x/_source/core/ckeditor_base.js	(revision 6821)
@@ -17,4 +17,13 @@
 // #### Raw code
 // ATTENTION: read the above "Compressed Code" notes when changing this code.
+
+/* @Packager.RemoveLine
+// Avoid having the editor code initialized twice. (#7588)
+// Use CKEDITOR.dom to check whether the full ckeditor.js code has been loaded
+// or just ckeditor_basic.js.
+// Remove these lines when compressing manually.
+if ( window.CKEDITOR && window.CKEDITOR.dom )
+	return;
+@Packager.RemoveLine */
 
 if ( !window.CKEDITOR )
Index: CKEditor/branches/versions/3.6.x/_source/core/plugindefinition.js
===================================================================
--- CKEditor/branches/versions/3.6.x/_source/core/plugindefinition.js	(revision 6819)
+++ CKEditor/branches/versions/3.6.x/_source/core/plugindefinition.js	(revision 6821)
@@ -28,4 +28,21 @@
  * {
  *     requires : [ 'button', 'selection' ]
+ * });
+ */
+
+/**
+ * A list of language files available for this plugin. These files are stored inside 
+ * the "lang" directory, which is inside the plugin directory, follow the name 
+ * pattern of "langCode.js", and contain a language definition created with {@link CKEDITOR.pluginDefinition#setLang}.
+ * While the plugin is being loaded, the editor checks this list to see if
+ * a language file of the current editor language ({@link CKEDITOR.editor#langCode}) 
+ * is available, and if so, loads it. Otherwise, the file represented by the first list item
+ * in the list is loaded.
+ * @name CKEDITOR.pluginDefinition.prototype.lang
+ * @type Array
+ * @example
+ * CKEDITOR.plugins.add( 'sample',
+ * {
+ *     lang : [ 'en', 'fr' ]
  * });
  */
Index: CKEditor/branches/versions/3.6.x/_source/core/plugins.js
===================================================================
--- CKEditor/branches/versions/3.6.x/_source/core/plugins.js	(revision 6819)
+++ CKEditor/branches/versions/3.6.x/_source/core/plugins.js	(revision 6821)
@@ -77,4 +77,18 @@
 	});
 
+/**
+ * Loads a specific language file, or auto detect it. A callback is
+ * then called when the file gets loaded.
+ * @param {String} pluginName The name of the plugin to which the provided translation
+ * 		should be attached.
+ * @param {String} languageCode The code of the language translation provided.
+ * @param {Object} languageEntries An object that contains pairs of label and
+ *		the respective translation.
+ * @example
+ * CKEDITOR.plugins.setLang( 'myPlugin', 'en', {
+ * 	title : 'My plugin',
+ * 	selectOption : 'Please select an option'
+ * } );
+ */
 CKEDITOR.plugins.setLang = function( pluginName, languageCode, languageEntries )
 {
Index: CKEditor/branches/versions/3.6.x/_source/plugins/button/plugin.js
===================================================================
--- CKEditor/branches/versions/3.6.x/_source/plugins/button/plugin.js	(revision 6819)
+++ CKEditor/branches/versions/3.6.x/_source/plugins/button/plugin.js	(revision 6821)
@@ -271,6 +271,6 @@
 /**
  * Adds a button definition to the UI elements list.
- * @param {String} The button name.
- * @param {Object} The button definition.
+ * @param {String} name The button name.
+ * @param {Object} definition The button definition.
  * @example
  * editorInstance.ui.addButton( 'MyBold',
Index: CKEditor/branches/versions/3.6.x/_source/plugins/clipboard/dialogs/paste.js
===================================================================
--- CKEditor/branches/versions/3.6.x/_source/plugins/clipboard/dialogs/paste.js	(revision 6819)
+++ CKEditor/branches/versions/3.6.x/_source/plugins/clipboard/dialogs/paste.js	(revision 6821)
@@ -67,83 +67,5 @@
 			this.parts.dialog.$.offsetHeight;
 
-			var htmlToLoad =
-				'<html dir="' + editor.config.contentsLangDirection + '"' +
-				' lang="' + ( editor.config.contentsLanguage || editor.langCode ) + '">' +
-					'<head><style>body { margin: 3px; height: 95%; } </style></head><body>' +
-					'<script id="cke_actscrpt" type="text/javascript">' +
-					'window.parent.CKEDITOR.tools.callFunction( ' + CKEDITOR.tools.addFunction( onPasteFrameLoad, this ) + ', this );' +
-					'</script></body>' +
-				'</html>';
-
-			var src =
-				CKEDITOR.env.air ?
-					'javascript:void(0)' :
-				isCustomDomain ?
-					'javascript:void((function(){' +
-						'document.open();' +
-						'document.domain=\'' + document.domain + '\';' +
-						'document.close();' +
-						'})())"'
-				:
-					'';
-
-			var iframe = CKEDITOR.dom.element.createFromHtml(
-						'<iframe' +
-						' class="cke_pasteframe"' +
-						' frameborder="0" ' +
-						' allowTransparency="true"' +
-						' src="' + src + '"' +
-						' role="region"' +
-						' aria-label="' + lang.pasteArea + '"' +
-						' aria-describedby="' + this.getContentElement( 'general', 'pasteMsg' ).domId + '"' +
-						' aria-multiple="true"' +
-						'></iframe>' );
-
-			iframe.on( 'load', function( e )
-				{
-					e.removeListener();
-
-					var doc = iframe.getFrameDocument();
-					doc.write( htmlToLoad );
-
-					if ( CKEDITOR.env.air )
-						onPasteFrameLoad.call( this, doc.getWindow().$ );
-				},
-				this );
-
-			iframe.setCustomData( 'dialog', this );
-
-			var field = this.getContentElement( 'general', 'editing_area' ),
-				container = field.getElement();
-			container.setHtml( '' );
-			container.append( iframe );
-
-			// IE need a redirect on focus to make
-			// the cursor blinking inside iframe. (#5461)
-			if ( CKEDITOR.env.ie )
-			{
-				var focusGrabber = CKEDITOR.dom.element.createFromHtml( '<span tabindex="-1" style="position:absolute;" role="presentation"></span>' );
-				focusGrabber.on( 'focus', function()
-				{
-					iframe.$.contentWindow.focus();
-				});
-				container.append( focusGrabber );
-
-				// Override focus handler on field.
-				field.focus = function()
-				{
-					focusGrabber.focus();
-					this.fire( 'focus' );
-				};
-			}
-
-			field.getInputElement = function(){ return iframe; };
-
-			// Force container to scale in IE.
-			if ( CKEDITOR.env.ie )
-			{
-				container.setStyle( 'display', 'block' );
-				container.setStyle( 'height', ( iframe.$.offsetHeight + 2 ) + 'px' );
-			}
+			this.setupContent();
 		},
 
@@ -162,18 +84,5 @@
 		onOk : function()
 		{
-			var container = this.getContentElement( 'general', 'editing_area' ).getElement(),
-				iframe = container.getElementsByTag( 'iframe' ).getItem( 0 ),
-				editor = this.getParentEditor(),
-				body = iframe.getFrameDocument().getBody(),
-				bogus = body.getBogus(),
-				html;
-			bogus && bogus.remove();
-			// Saving the contents in variable so changes until paste is complete will not take place (#7500)
-			html = body.getHtml();
-
-			setTimeout( function(){
-				editor.fire( 'paste', { 'html' : html } );
-			}, 0 );
-
+			this.commitContent();
 		},
 
@@ -209,4 +118,101 @@
 								win.focus();
 							}, 500 );
+						},
+						setup : function()
+						{
+							var dialog = this.getDialog();
+							var htmlToLoad = 
+								'<html dir="' + editor.config.contentsLangDirection + '"' +
+								' lang="' + ( editor.config.contentsLanguage || editor.langCode ) + '">' +
+								'<head><style>body { margin: 3px; height: 95%; } </style></head><body>' +
+								'<script id="cke_actscrpt" type="text/javascript">' +
+								'window.parent.CKEDITOR.tools.callFunction( ' + CKEDITOR.tools.addFunction( onPasteFrameLoad, dialog ) + ', this );' +
+								'</script></body>' +
+								'</html>';
+
+							var src =
+								CKEDITOR.env.air ?
+									'javascript:void(0)' :
+								isCustomDomain ?
+									'javascript:void((function(){' +
+										'document.open();' +
+										'document.domain=\'' + document.domain + '\';' +
+										'document.close();' +
+									'})())"'
+								:
+									'';
+
+							var iframe = CKEDITOR.dom.element.createFromHtml(
+								'<iframe' +
+									' class="cke_pasteframe"' +
+									' frameborder="0" ' +
+									' allowTransparency="true"' +
+									' src="' + src + '"' +
+									' role="region"' +
+									' aria-label="' + lang.pasteArea + '"' +
+									' aria-describedby="' + dialog.getContentElement( 'general', 'pasteMsg' ).domId + '"' +
+									' aria-multiple="true"' +
+									'></iframe>' );
+
+							iframe.on( 'load', function( e )
+							{
+								e.removeListener();
+
+								var doc = iframe.getFrameDocument();
+								doc.write( htmlToLoad );
+
+								if ( CKEDITOR.env.air )
+									onPasteFrameLoad.call( this, doc.getWindow().$ );
+							}, dialog );
+
+							iframe.setCustomData( 'dialog', dialog );
+
+							var container = this.getElement();
+							container.setHtml( '' );
+							container.append( iframe );
+
+							// IE need a redirect on focus to make
+							// the cursor blinking inside iframe. (#5461)
+							if ( CKEDITOR.env.ie )
+							{
+								var focusGrabber = CKEDITOR.dom.element.createFromHtml( '<span tabindex="-1" style="position:absolute;" role="presentation"></span>' );
+								focusGrabber.on( 'focus', function()
+								{
+									iframe.$.contentWindow.focus();
+								});
+								container.append( focusGrabber );
+
+								// Override focus handler on field.
+								this.focus = function()
+								{
+									focusGrabber.focus();
+									this.fire( 'focus' );
+								};
+							}
+
+							this.getInputElement = function(){ return iframe; };
+
+							// Force container to scale in IE.
+							if ( CKEDITOR.env.ie )
+							{
+								container.setStyle( 'display', 'block' );
+								container.setStyle( 'height', ( iframe.$.offsetHeight + 2 ) + 'px' );
+							}
+						},
+						commit : function( data )
+						{
+							var container = this.getElement(),
+								editor = this.getDialog().getParentEditor(),
+								body = this.getInputElement().getFrameDocument().getBody(),
+								bogus = body.getBogus(),
+								html;
+							bogus && bogus.remove();
+
+							// Saving the contents so changes until paste is complete will not take place (#7500) 
+							html = body.getHtml();
+
+							setTimeout( function(){
+								editor.fire( 'paste', { 'html' : html } );
+							}, 0 );
 						}
 					}
Index: CKEditor/branches/versions/3.6.x/_source/plugins/clipboard/plugin.js
===================================================================
--- CKEditor/branches/versions/3.6.x/_source/plugins/clipboard/plugin.js	(revision 6819)
+++ CKEditor/branches/versions/3.6.x/_source/plugins/clipboard/plugin.js	(revision 6821)
@@ -390,5 +390,5 @@
 								// The very last guard to make sure the
 								// paste has successfully happened.
-								if ( !CKEDITOR.tools.trim( data.toLowerCase().replace( /<span[^>]+data-cke-bookmark[^<]*?<\/span>/g,'' ) ) )
+								if ( !( data = CKEDITOR.tools.trim( data.replace( /<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,'' ) ) ) )
 									return;
 
Index: CKEditor/branches/versions/3.6.x/_source/plugins/colorbutton/plugin.js
===================================================================
--- CKEditor/branches/versions/3.6.x/_source/plugins/colorbutton/plugin.js	(revision 6819)
+++ CKEditor/branches/versions/3.6.x/_source/plugins/colorbutton/plugin.js	(revision 6821)
@@ -228,4 +228,5 @@
 /**
  * Whether to enable the "More Colors..." button in the color selectors.
+ * @name CKEDITOR.config.colorButton_enableMore
  * @default true
  * @type Boolean
@@ -241,4 +242,5 @@
  * name and the slash character. For example, "FontColor1/FF9900" will be
  * displayed as the color #FF9900 in the selector, but will be outputted as "FontColor1".
+ * @name CKEDITOR.config.colorButton_colors
  * @type String
  * @default '000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF'
@@ -258,4 +260,5 @@
 /**
  * Holds the style definition to be used to apply the text foreground color.
+ * @name CKEDITOR.config.colorButton_foreStyle
  * @type Object
  * @example
@@ -276,4 +279,5 @@
 /**
  * Holds the style definition to be used to apply the text background color.
+ * @name CKEDITOR.config.colorButton_backStyle
  * @type Object
  * @example
Index: CKEditor/branches/versions/3.6.x/_source/plugins/dialog/dialogDefinition.js
===================================================================
--- CKEditor/branches/versions/3.6.x/_source/plugins/dialog/dialogDefinition.js	(revision 6819)
+++ CKEditor/branches/versions/3.6.x/_source/plugins/dialog/dialogDefinition.js	(revision 6821)
@@ -283,4 +283,22 @@
  * Function to execute whenever the UI element's parent dialog is closed.
  * @name CKEDITOR.dialog.definition.uiElement.prototype.onHide
+ * @field
+ * @type Function
+ * @example
+ */
+
+/**
+ * Function to execute whenever the UI element's parent dialog's {@link CKEDITOR.dialog.definition.setupContent} method is executed.
+ * It usually takes care of the respective UI element as a standalone element.
+ * @name CKEDITOR.dialog.definition.uiElement.prototype.setup
+ * @field
+ * @type Function
+ * @example
+ */
+
+/**
+ * Function to execute whenever the UI element's parent dialog's {@link CKEDITOR.dialog.definition.commitContent} method is executed.
+ * It usually takes care of the respective UI element as a standalone element.
+ * @name CKEDITOR.dialog.definition.uiElement.prototype.commit
  * @field
  * @type Function
Index: CKEditor/branches/versions/3.6.x/_source/plugins/dialog/plugin.js
===================================================================
--- CKEditor/branches/versions/3.6.x/_source/plugins/dialog/plugin.js	(revision 6819)
+++ CKEditor/branches/versions/3.6.x/_source/plugins/dialog/plugin.js	(revision 6821)
@@ -860,4 +860,14 @@
 		})(),
 
+
+		/**
+		 * Calls the {@link CKEDITOR.dialog.definition.uiElement#setup} method of each of the UI elements, with the arguments passed through it.
+		 * It is usually being called when the dialog is opened, to put the initial value inside the field.
+		 * @example
+		 * dialogObj.setupContent();
+		 * @example
+		 * var timestamp = ( new Date() ).valueOf();
+		 * dialogObj.setupContent( timestamp );
+		 */
 		setupContent : function()
 		{
@@ -870,4 +880,13 @@
 		},
 
+		/**
+		 * Calls the {@link CKEDITOR.dialog.definition.uiElement#commit} method of each of the UI elements, with the arguments passed through it.
+		 * It is usually being called when the user confirms the dialog, to process the values.
+		 * @example
+		 * dialogObj.commitContent();
+		 * @example
+		 * var timestamp = ( new Date() ).valueOf();
+		 * dialogObj.commitContent( timestamp );
+		 */
 		commitContent : function()
 		{
@@ -1140,4 +1159,5 @@
 		 * @param {String} elementId id of UI element.
 		 * @example
+		 * dialogObj.getContentElement( 'tabId', 'elementId' ).setValue( 'Example' );
 		 * @returns {CKEDITOR.ui.dialog.uiElement} The dialog UI element.
 		 */
@@ -1153,4 +1173,5 @@
 		 * @param {String} elementId id of UI element.
 		 * @example
+		 * alert( dialogObj.getValueOf( 'tabId', 'elementId' ) );
 		 * @returns {Object} The value of the UI element.
 		 */
@@ -1166,4 +1187,5 @@
 		 * @param {Object} value The new value of the UI element.
 		 * @example
+		 * dialogObj.setValueOf( 'tabId', 'elementId', 'Example' );
 		 */
 		setValueOf : function( pageId, elementId, value )
Index: CKEditor/branches/versions/3.6.x/_source/plugins/entities/plugin.js
===================================================================
--- CKEditor/branches/versions/3.6.x/_source/plugins/entities/plugin.js	(revision 6819)
+++ CKEditor/branches/versions/3.6.x/_source/plugins/entities/plugin.js	(revision 6821)
@@ -192,4 +192,5 @@
 /**
  * Whether to use HTML entities in the output.
+ * @name CKEDITOR.config.entities
  * @type Boolean
  * @default true
@@ -203,4 +204,5 @@
  * to HTML entities. The list of entities can be found at the
  * <a href="http://www.w3.org/TR/html4/sgml/entities.html#h-24.2.1">W3C HTML 4.01 Specification, section 24.2.1</a>.
+ * @name CKEDITOR.config.entities_latin
  * @type Boolean
  * @default true
@@ -215,4 +217,5 @@
  * The list of entities can be found at the
  * <a href="http://www.w3.org/TR/html4/sgml/entities.html#h-24.3.1">W3C HTML 4.01 Specification, section 24.3.1</a>.
+ * @name CKEDITOR.config.entities_greek
  * @type Boolean
  * @default true
@@ -228,5 +231,5 @@
  * For example, the phrase "This is Chinese: &#27721;&#35821;." is outputted
  * as "This is Chinese: &amp;#27721;&amp;#35821;."
- * @type Boolean
+ * @name CKEDITOR.config.entities_processNumerical
  * @type Boolean|String
  * @default false
@@ -240,4 +243,5 @@
  * entry separated by a comma. Entities names or number must be used, exclusing
  * the "&amp;" preffix and the ";" termination.
+ * @name CKEDITOR.config.entities_additional
  * @default '#39'  // The single quote (') character.
  * @type String
Index: CKEditor/branches/versions/3.6.x/_source/plugins/indent/plugin.js
===================================================================
--- CKEditor/branches/versions/3.6.x/_source/plugins/indent/plugin.js	(revision 6819)
+++ CKEditor/branches/versions/3.6.x/_source/plugins/indent/plugin.js	(revision 6821)
@@ -455,5 +455,5 @@
  * @name CKEDITOR.config.indentClasses
  * @type Array
- * default null
+ * @default null
  * @example
  * // Use the classes 'Indent1', 'Indent2', 'Indent3'
Index: CKEditor/branches/versions/3.6.x/_source/plugins/justify/plugin.js
===================================================================
--- CKEditor/branches/versions/3.6.x/_source/plugins/justify/plugin.js	(revision 6819)
+++ CKEditor/branches/versions/3.6.x/_source/plugins/justify/plugin.js	(revision 6821)
@@ -241,2 +241,13 @@
 	});
 })();
+
+ /**
+ * List of classes to use for aligning the contents. If it's null, no classes will be used
+ * and instead the corresponding CSS values will be used. The array should contain 4 members, in the following order: left, center, right, justify.
+ * @name CKEDITOR.config.justifyClasses
+ * @type Array
+ * @default null
+ * @example
+ * // Use the classes 'AlignLeft', 'AlignCenter', 'AlignRight', 'AlignJustify'
+ * config.justifyClasses = [ 'AlignLeft', 'AlignCenter', 'AlignRight', 'AlignJustify' ];
+ */
Index: CKEditor/branches/versions/3.6.x/_source/plugins/pastetext/dialogs/pastetext.js
===================================================================
--- CKEditor/branches/versions/3.6.x/_source/plugins/pastetext/dialogs/pastetext.js	(revision 6819)
+++ CKEditor/branches/versions/3.6.x/_source/plugins/pastetext/dialogs/pastetext.js	(revision 6821)
@@ -14,21 +14,6 @@
 				minHeight : 240,
 
-				onShow : function()
-				{
-					// Reset the textarea value.
-					this.getContentElement( 'general', 'content' ).getInputElement().setValue( '' );
-				},
-
-				onOk : function()
-				{
-					// Get the textarea value.
-					var text = this.getContentElement( 'general', 'content' ).getInputElement().getValue(),
-						editor = this.getParentEditor();
-
-					setTimeout( function()
-					{
-						editor.fire( 'paste', { 'text' : text } );
-					}, 0 );
-				},
+				onShow : function(){ this.setupContent(); },
+				onOk : function(){ this.commitContent(); },
 
 				contents :
@@ -61,4 +46,16 @@
 								{
 									this.getElement().focus();
+								},
+								setup : function()
+								{
+									this.setValue( '' );
+								},
+								commit : function()
+								{
+									var value = this.getValue();
+									setTimeout( function()
+									{
+										editor.fire( 'paste', { 'text' : value } );
+									}, 0 );
 								}
 							}
Index: CKEditor/branches/versions/3.6.x/_source/plugins/styles/plugin.js
===================================================================
--- CKEditor/branches/versions/3.6.x/_source/plugins/styles/plugin.js	(revision 6819)
+++ CKEditor/branches/versions/3.6.x/_source/plugins/styles/plugin.js	(revision 6821)
@@ -816,5 +816,5 @@
 		var root = range.getCommonAncestor( true, true ),
 			element = root.getAscendant( this.element, true );
-		element && setupElement( element, this );
+		element && !element.isReadOnly() && setupElement( element, this );
 	}
 
@@ -873,6 +873,9 @@
 		while ( ( block = iterator.getNextParagraph() ) )		// Only one =
 		{
-			var newBlock = getElement( this, doc, block );
-			replaceBlock( block, newBlock );
+			if ( !block.isReadOnly() )
+			{
+				var newBlock = getElement( this, doc, block );
+				replaceBlock( block, newBlock );
+			}
 		}
 
@@ -1446,4 +1449,14 @@
 		else
 			styleText = unparsedCssText;
+
+		// Normalize font-family property, ignore quotes and being case insensitive. (#7322)
+		// http://www.w3.org/TR/css3-fonts/#font-family-the-font-family-property
+		styleText = styleText.replace( /(font-family:)(.*?)(?=;|$)/, function ( match, prop, val )
+		{
+			var names = val.split( ',' );
+			for ( var i = 0; i < names.length; i++ )
+				names[ i ] = CKEDITOR.tools.trim( names[ i ].replace( /["']/g, '' ) );
+			return prop + names.join( ',' );
+		});
 
 		// Shrinking white-spaces around colon and semi-colon (#4147).
Index: CKEditor/branches/versions/3.6.x/_source/plugins/undo/plugin.js
===================================================================
--- CKEditor/branches/versions/3.6.x/_source/plugins/undo/plugin.js	(revision 6819)
+++ CKEditor/branches/versions/3.6.x/_source/plugins/undo/plugin.js	(revision 6821)
@@ -546,4 +546,5 @@
  * The number of undo steps to be saved. The higher this setting value the more
  * memory is used for it.
+ * @name CKEDITOR.config.undoStackSize
  * @type Number
  * @default 20
Index: CKEditor/branches/versions/3.6.x/_source/plugins/wysiwygarea/plugin.js
===================================================================
--- CKEditor/branches/versions/3.6.x/_source/plugins/wysiwygarea/plugin.js	(revision 6819)
+++ CKEditor/branches/versions/3.6.x/_source/plugins/wysiwygarea/plugin.js	(revision 6821)
@@ -366,6 +366,10 @@
 				lastNode = pathBlock && pathBlock.getLast( isNotEmpty );
 
-			// In case it's not ended with block element and doesn't have bogus yet. (#7467)
+			// Check some specialities of the current path block:
+			// 1. It is really displayed as block; (#7221)
+			// 2. It doesn't end with one inner block; (#7467)
+			// 3. It doesn't have bogus br yet.
 			if ( pathBlock
+					&& pathBlock.isBlockBoundary()
 					&& !( lastNode && lastNode.type == CKEDITOR.NODE_ELEMENT && lastNode.isBlockBoundary() )
 					&& !pathBlock.is( 'pre' )
