Index: /FCKeditor/branches/versions/2.4.x/_whatsnew.html
===================================================================
--- /FCKeditor/branches/versions/2.4.x/_whatsnew.html	(revision 191)
+++ /FCKeditor/branches/versions/2.4.x/_whatsnew.html	(revision 192)
@@ -49,5 +49,5 @@
 			file download from one of their mirrors. This disables the ability of "click and
 			go" (which can still be achieved by pointing the download to a file in your server),
-			but removes any troubles with mirros link changes (and they change it frequently).</li>
+			but removes any troubles with mirrors link changes (and they change it frequently).</li>
 		<li>The Word cleanup has been changed to remove "display:none" tags that may come from
 			Word.</li>
@@ -61,5 +61,5 @@
 			generated ASP error 0138.</li>
 		<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1288609&group_id=75348">SF
-			BUG-1288609</a>] The content of iframes are preserved.</li>
+			BUG-1288609</a>] The content of iframes is now preserved.</li>
 		<li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1245504&group_id=75348">SF
 			BUG-1245504</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1652240&group_id=75348">SF
@@ -91,4 +91,10 @@
 			it was not possible to paste if "Allow paste operation via script" was disabled
 			in the browser security settings.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/112">#112</a>] The enter
+			key now behaves correctly on lists with Firefox, when the EnterMode is set to 'br'.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/112">#152</a>] Invalid
+			self-closing tags are now being fixed before loading. </li>
+		<li>A few tags were being ignored to the check for required contents (not getting stripped
+			out, as expected). Fixed.</li>
 	</ul>
 	<h3>
Index: /FCKeditor/branches/versions/2.4.x/editor/_source/classes/fckenterkey.js
===================================================================
--- /FCKeditor/branches/versions/2.4.x/editor/_source/classes/fckenterkey.js	(revision 191)
+++ /FCKeditor/branches/versions/2.4.x/editor/_source/classes/fckenterkey.js	(revision 192)
@@ -273,9 +273,12 @@
 }
 
-FCKEnterKey.prototype._ExecuteEnterBlock = function( blockTag )
+FCKEnterKey.prototype._ExecuteEnterBlock = function( blockTag, range )
 {
 	// Get the current selection.
-	var oRange = new FCKDomRange( this.Window ) ;
-	oRange.MoveToSelection() ;
+	var oRange = range || new FCKDomRange( this.Window ) ;
+	
+	// If we don't have a range, move it to the selection.
+	if ( !range )
+		oRange.MoveToSelection() ;
 
 	// The selection boundaries must be in the same "block limit" element.
@@ -437,5 +440,5 @@
 
 		if ( !bHasShift && sStartBlockTag == 'LI' )
-			return this._ExecuteEnterBlock( null ) ;
+			return this._ExecuteEnterBlock( null, oRange ) ;
 
 		// If we are at the end of a header block.
Index: /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fck.js
===================================================================
--- /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fck.js	(revision 191)
+++ /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fck.js	(revision 192)
@@ -48,10 +48,15 @@
 	IsDirty : function()
 	{
-		return ( this.StartupValue != this.EditorDocument.body.innerHTML ) ;
+		if ( this.EditMode == FCK_EDITMODE_SOURCE )
+			return ( this.StartupValue != this.EditingArea.Textarea.value ) ;
+		else
+			return ( this.StartupValue != this.EditorDocument.body.innerHTML ) ;
 	},
 
 	ResetIsDirty : function()
 	{
-		if ( this.EditorDocument.body )
+		if ( this.EditMode == FCK_EDITMODE_SOURCE )
+			this.StartupValue = this.EditingArea.Textarea.value ;
+		else if ( this.EditorDocument.body )
 			this.StartupValue = this.EditorDocument.body.innerHTML ;
 	},
@@ -86,5 +91,5 @@
 
 		// Set the editor's startup contents
-		this.SetHTML( this.GetLinkedFieldValue() ) ;
+		this.SetHTML( this.GetLinkedFieldValue(), true ) ;
 	},
 
@@ -300,5 +305,5 @@
 	},
 
-	SetHTML : function( html )
+	SetHTML : function( html, resetIsDirty )
 	{
 		this.EditingArea.Mode = FCK.EditMode ;
@@ -307,4 +312,8 @@
 		{
 			html = FCKConfig.ProtectedSource.Protect( html ) ;
+			
+			// Fix for invalid self-closing tags (see #152).
+			html = html.replace( FCKRegexLib.InvalidSelfCloseTags, '$1></$2>' ) ;
+			
 			html = FCK.ProtectEvents( html ) ;
 			html = FCK.ProtectUrls( html ) ;
@@ -320,4 +329,6 @@
 				html = html.replace( FCKRegexLib.EmCloser, '<\/i>' ) ;
 			}
+			
+			this._ForceResetIsDirty = ( resetIsDirty === true ) ;
 
 			var sHtml = '' ;
@@ -416,4 +427,7 @@
 			// Removes the enter key handler.
 			FCK.EnterKeyHandler = null ;
+			
+			if ( resetIsDirty )
+				this.ResetIsDirty() ;
 
 			// Listen for keystroke events.
@@ -530,4 +544,8 @@
 	{
 		var bIsWysiwyg = ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) ;
+
+		// Save the current IsDirty state, so we may restore it after the switch.
+		var bIsDirty = FCK.IsDirty() ;
+
 		var sHtml ;
 
@@ -548,6 +566,6 @@
 		FCK.EditMode = bIsWysiwyg ? FCK_EDITMODE_SOURCE : FCK_EDITMODE_WYSIWYG ;
 
-		FCK.SetHTML( sHtml ) ;
-
+		FCK.SetHTML( sHtml, !bIsDirty ) ;
+		
 		// Set the Focus.
 		FCK.Focus() ;
@@ -623,4 +641,7 @@
 	// Listen for keystroke events.
 	FCK.KeystrokeHandler.AttachToElement( FCK.EditorDocument ) ;
+	
+	if ( FCK._ForceResetIsDirty )
+		FCK.ResetIsDirty() ;
 
 	FCK.OnAfterSetHTML() ;
@@ -629,7 +650,4 @@
 	if ( FCK.Status != FCK_STATUS_NOTLOADED )
 		return ;
-
-	// Save the startup value for the "IsDirty()" check.
-	FCK.ResetIsDirty() ;
 
 	FCK.SetStatus( FCK_STATUS_ACTIVE ) ;
Index: /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fck_ie.js
===================================================================
--- /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fck_ie.js	(revision 191)
+++ /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fck_ie.js	(revision 192)
@@ -261,5 +261,5 @@
 	if ( !FCK._CheckIsPastingEnabled() )
 	{
-		FCKDialog.OpenDialog( 'FCKDialog_Paste', FCKLang.PasteAsText, 'dialog/fck_paste.html', 400, 330, 'PlainText' )
+		FCKDialog.OpenDialog( 'FCKDialog_Paste', FCKLang.PasteAsText, 'dialog/fck_paste.html', 400, 330, 'PlainText' ) ;
 		return ;
 	}
Index: /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fcklistslib.js
===================================================================
--- /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fcklistslib.js	(revision 191)
+++ /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fcklistslib.js	(revision 192)
@@ -38,5 +38,5 @@
 
 	// Inline elements which MUST have child nodes.
-	InlineChildReqElements : { abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strong:1,sub:1,sup:1,tt:1,'var':1 },
+	InlineChildReqElements : { abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 },
 
 	// Elements marked as empty "Empty" in the XHTML DTD.
Index: /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fckregexlib.js
===================================================================
--- /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fckregexlib.js	(revision 191)
+++ /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fckregexlib.js	(revision 192)
@@ -86,4 +86,7 @@
 ProtectedEvents : /\s\w+_fckprotectedatt="([^"]+)"/g,
 
-StyleProperties : /\S+\s*:/g
+StyleProperties : /\S+\s*:/g,
+
+// [a-zA-Z0-9:]+ seams to be more efficient than [\w:]+
+InvalidSelfCloseTags : /(<(?!base|meta|link|hr|br|param|img|area|input)([a-zA-Z0-9:]+)[^>]*)\/>/gi
 } ;
Index: /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fckxhtml.js
===================================================================
--- /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fckxhtml.js	(revision 191)
+++ /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fckxhtml.js	(revision 192)
@@ -364,5 +364,5 @@
 		}
 
-		FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
+		node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
 
 		return node ;
@@ -406,5 +406,5 @@
 			FCKXHtml._RemoveAttribute( node, FCKRegexLib.FCK_Class, 'class' ) ;
 
-		FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
+		node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
 
 		return node ;
@@ -429,5 +429,5 @@
 		}
 
-		FCKXHtml._AppendChildNodes( node, htmlNode ) ;
+		node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
 
 		return node ;
@@ -440,5 +440,5 @@
 			return false ;
 
-		FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
+		node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
 
 		return node ;
Index: /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fckxhtml_ie.js
===================================================================
--- /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fckxhtml_ie.js	(revision 191)
+++ /FCKeditor/branches/versions/2.4.x/editor/_source/internals/fckxhtml_ie.js	(revision 192)
@@ -98,5 +98,5 @@
 		node = FCKXHtml.XML.createDocumentFragment() ;
 
-	FCKXHtml._AppendChildNodes( node, htmlNode ) ;
+	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
 
 	return node ;
@@ -124,5 +124,5 @@
 		FCKXHtml._AppendAttribute( node, 'selected', 'selected' ) ;
 
-	FCKXHtml._AppendChildNodes( node, htmlNode ) ;
+	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
 
 	return node ;
@@ -154,5 +154,5 @@
 		FCKXHtml._AppendAttribute( node, 'for', htmlNode.htmlFor ) ;
 
-	FCKXHtml._AppendChildNodes( node, htmlNode ) ;
+	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
 
 	return node ;
@@ -167,5 +167,5 @@
 		FCKXHtml._AppendAttribute( node, 'name', htmlNode.name ) ;
 
-	FCKXHtml._AppendChildNodes( node, htmlNode ) ;
+	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
 
 	return node ;
@@ -178,5 +178,5 @@
 		FCKXHtml._AppendAttribute( node, 'name', htmlNode.name ) ;
 
-	FCKXHtml._AppendChildNodes( node, htmlNode ) ;
+	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
 
 	return node ;
@@ -189,5 +189,5 @@
 		FCKXHtml._AppendAttribute( node, 'align', htmlNode.align ) ;
 
-	FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
+	node = FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
 
 	return node ;
Index: /FCKeditor/branches/versions/2.4.x/editor/filemanager/browser/default/connectors/php/config.php
===================================================================
--- /FCKeditor/branches/versions/2.4.x/editor/filemanager/browser/default/connectors/php/config.php	(revision 191)
+++ /FCKeditor/branches/versions/2.4.x/editor/filemanager/browser/default/connectors/php/config.php	(revision 192)
@@ -28,4 +28,9 @@
 $Config['Enabled'] = false ;
 
+// @Packager.Remove.Start
+// Attention: In the development version (SVN) the PHP connector is enabled by default.
+$Config['Enabled'] = true ;
+// @Packager.Remove.End
+
 // Path to user files relative to the document root.
 $Config['UserFilesPath'] = '/userfiles/' ;
Index: /FCKeditor/branches/versions/2.4.x/fckconfig.js
===================================================================
--- /FCKeditor/branches/versions/2.4.x/fckconfig.js	(revision 191)
+++ /FCKeditor/branches/versions/2.4.x/fckconfig.js	(revision 192)
@@ -183,4 +183,10 @@
 var _QuickUploadLanguage	= 'asp' ;	// asp | aspx | cfm | lasso | php
 
+// @Packager.Remove.Start
+// The development version (SVN) uses the PHP connector by default.
+_FileBrowserLanguage	= 'php' ;
+_QuickUploadLanguage	= 'php' ;
+// @Packager.Remove.End
+
 // Don't care about the following line. It just calculates the correct connector
 // extension to use for the default File Browser (Perl uses "cgi").
