Index: /FCKeditor/branches/features/dataprocessor/_dev/releaser/fckreleaser.php
===================================================================
--- /FCKeditor/branches/features/dataprocessor/_dev/releaser/fckreleaser.php	(revision 244)
+++ /FCKeditor/branches/features/dataprocessor/_dev/releaser/fckreleaser.php	(revision 245)
@@ -349,5 +349,5 @@
 function StrEndsWith( $str, $sub )
 {
-   return ( substr( $str, strlen( $str ) - strlen( $sub ) ) == $sub ) ;
+	return ( substr( $str, strlen( $str ) - strlen( $sub ) ) == $sub ) ;
 }
 
@@ -363,5 +363,5 @@
 {
 	$dirParts = explode( '/', $path ) ;
-	
+
 	$currentDir = '' ;
 
@@ -369,5 +369,5 @@
 	{
 		$currentDir .= $dirPart . '/' ;
-		
+
 		if ( strlen( $dirPart ) > 0 && !is_dir( $currentDir ) )
 			mkdir( $currentDir, $rights ) ;
@@ -385,22 +385,5 @@
 		fwrite( $f, "\xEF\xBB\xBF" ) ;	// BOM
 
-	fwrite( $f, $strData ) ;
-	fclose( $f ) ;
-
-	return TRUE ;
-}
-
-function SaveStringToUtf8File( $strData, $filePath, $includeBom = TRUE )
-{
-	$f = @fopen( $filePath, 'wb' ) ;
-
-	if ( !$f )
-		return FALSE ;
-
-	if ( $includeBom )
-		fwrite( $f, "\xEF\xBB\xBF" ) ;	// BOM
-
-	fwrite( $f, ( $strData ) ) ;
-
+	fwrite( $f, StripUtf8Bom( $strData ) ) ;
 	fclose( $f ) ;
 
@@ -954,8 +937,8 @@
 	function ProcessFile( $sourceFilePath, $destinationFilePath, $onlyHeader = FALSE )
 	{
-		SaveStringToUtf8File(
+		SaveStringToFile(
 			FCKPreProcessor::Process( file_get_contents( $sourceFilePath ), $onlyHeader ),
 			$destinationFilePath,
-			( !StrEndsWith( $sourceFilePath, '.asp' ) && !StrEndsWith( $sourceFilePath, '.js' ) ) ) ;	// Only ASP and JavaScript files require the BOM.
+			( StrEndsWith( $sourceFilePath, '.asp' ) || StrEndsWith( $sourceFilePath, '.js' ) ) ) ;	// Only ASP and JavaScript files require the BOM.
 
 		// Set the destination file Last Access and Last Write times.
Index: /FCKeditor/branches/features/dataprocessor/_whatsnew.html
===================================================================
--- /FCKeditor/branches/features/dataprocessor/_whatsnew.html	(revision 244)
+++ /FCKeditor/branches/features/dataprocessor/_whatsnew.html	(revision 245)
@@ -31,5 +31,33 @@
 <body>
 	<h3>
-		Version 2.4.1 (SVN)</h3>
+		Version 2.4.3 (SVN)</h3>
+	<p>
+		New Features and Improvements:</p>
+	<ul>
+		<li>The editor now uses the <strong>Data Processor</strong> technology, which makes
+			it possible to handle different input formats. A sample of it may be found at "editor/plugins/bbcode/_sample",
+			that shows some simple BBCode support.</li>
+	</ul>
+	<p>
+		Fixed Bugs:</p>
+	<ul>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/300">#300</a>] The fck_internal.css
+			file was not validating with the W3C CSS Validation Service.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/336">#336</a>] Ordered
+			list didn't keep the Type attribute properly (it was converted to lowercase when
+			the properties dialog was opened again).</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/318">#318</a>] Multiple
+			linked images are merged in a single link in IE.</li>
+	</ul>
+	<h3>
+		Version 2.4.2</h3>
+	<p>
+		Fixed Bugs:</p>
+	<ul>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/279">#279</a>] The UTF-8
+			BOM was being included in the wrong files, affecting mainly PHP installations.</li>
+	</ul>
+	<h3>
+		Version 2.4.1</h3>
 	<p>
 		New Features and Improvements:</p>
Index: /FCKeditor/branches/features/dataprocessor/editor/_source/classes/fckdataprocessor.js
===================================================================
--- /FCKeditor/branches/features/dataprocessor/editor/_source/classes/fckdataprocessor.js	(revision 244)
+++ /FCKeditor/branches/features/dataprocessor/editor/_source/classes/fckdataprocessor.js	(revision 245)
@@ -45,7 +45,4 @@
 	ConvertToHtml : function( data )
 	{
-		// Protect event attributes (they could get fired in the editing area).
-		data = this._ProtectEvents( data ) ;
-
 		// The default data processor must handle two different cases depending
 		// on the FullPage setting. Custom Data Processors will not be
@@ -116,7 +113,4 @@
 			return '' ;
 
-		// Restore protected event attributes.
-		data = this._ProtectEventsRestore( data ) ;
-
 		return data ;
 	},
@@ -128,36 +122,6 @@
 	 */
 	FixHtml : function( html )
-	{},
-
-	// Saves event attributes (like onclick) so they don't get executed while
-	// editing.
-	_ProtectEvents : function( html )
 	{
-		return html.replace( FCKRegexLib.TagsWithEvent, _FCKDataProcessor_ProtectEvents_ReplaceTags ) ;
-	},
-
-	_ProtectEventsRestore : function( html )
-	{
-		return html.replace( FCKRegexLib.ProtectedEvents, _FCKDataProcessor_ProtectEvents_RestoreEvents ) ;
+		return html ;
 	}
 } ;
-
-// Replace all events attributes (like onclick).
-function _FCKDataProcessor_ProtectEvents_ReplaceTags( tagMatch )
-{
-	return tagMatch.replace( FCKRegexLib.EventAttributes, _FCKDataProcessor_ProtectEvents_ReplaceEvents ) ;
-}
-
-// Replace an event attribute with its respective __fckprotectedatt attribute.
-// The original event markup will be encoded and saved as the value of the new
-// attribute.
-function _FCKDataProcessor_ProtectEvents_ReplaceEvents( eventMatch, attName )
-{
-	return ' ' + attName + '_fckprotectedatt="' + eventMatch.ReplaceAll( [/&/g,/'/g,/"/g,/=/g,/</g,/>/g,/\r/g,/\n/g], ['&apos;','&#39;','&quot;','&#61;','&lt;','&gt;','&#10;','&#13;'] ) + '"' ;
-}
-
-function _FCKDataProcessor_ProtectEvents_RestoreEvents( match, encodedOriginal )
-{
-	return encodedOriginal.ReplaceAll( [/&#39;/g,/&quot;/g,/&#61;/g,/&lt;/g,/&gt;/g,/&#10;/g,/&#13;/g,/&apos;/g], ["'",'"','=','<','>','\r','\n','&'] ) ;
-}
-
Index: /FCKeditor/branches/features/dataprocessor/editor/_source/internals/fck.js
===================================================================
--- /FCKeditor/branches/features/dataprocessor/editor/_source/internals/fck.js	(revision 244)
+++ /FCKeditor/branches/features/dataprocessor/editor/_source/internals/fck.js	(revision 245)
@@ -214,4 +214,7 @@
 			format ) ;
 
+		// Restore protected attributes.
+		data = FCK.ProtectEventsRestore( data ) ;
+
 		if ( FCKBrowserInfo.IsIE )
 			data = data.replace( FCKRegexLib.ToReplace, '$1' ) ;
@@ -272,4 +275,16 @@
 	},
 
+	// Saves event attributes (like onclick) so they don't get executed while
+	// editing.
+	ProtectEvents : function( html )
+	{
+		return html.replace( FCKRegexLib.TagsWithEvent, _FCK_ProtectEvents_ReplaceTags ) ;
+	},
+
+	ProtectEventsRestore : function( html )
+	{
+		return html.replace( FCKRegexLib.ProtectedEvents, _FCK_ProtectEvents_RestoreEvents ) ;
+	},
+
 	ProtectTags : function( html )
 	{
@@ -279,5 +294,5 @@
 		if ( FCKBrowserInfo.IsIE )
 			sTags += sTags.length > 0 ? '|ABBR' : 'ABBR' ;
-		
+
 		var oRegex ;
 		if ( sTags.length > 0 )
@@ -289,5 +304,5 @@
 			html = html.replace( oRegex, '<\/FCK:$1>' ) ;
 		}
-		
+
 		// Protect some empty elements. We must do it separately becase the
 		// original tag may not contain the closing slash, like <hr>:
@@ -325,5 +340,8 @@
 			// Fix for invalid self-closing tags (see #152).
 			data = data.replace( FCKRegexLib.InvalidSelfCloseTags, '$1></$2>' ) ;
-			
+
+			// Protect event attributes (they could get fired in the editing area).
+			data = FCK.ProtectEvents( data ) ;
+
 			// Protect some things from the browser itself.
 			data = FCK.ProtectUrls( data ) ;
@@ -570,4 +588,23 @@
 FCK.SetHTML = FCK.SetData ;
 
+// Replace all events attributes (like onclick).
+function _FCK_ProtectEvents_ReplaceTags( tagMatch )
+{
+	return tagMatch.replace( FCKRegexLib.EventAttributes, _FCK_ProtectEvents_ReplaceEvents ) ;
+}
+
+// Replace an event attribute with its respective __fckprotectedatt attribute.
+// The original event markup will be encoded and saved as the value of the new
+// attribute.
+function _FCK_ProtectEvents_ReplaceEvents( eventMatch, attName )
+{
+	return ' ' + attName + '_fckprotectedatt="' + eventMatch.ReplaceAll( [/&/g,/'/g,/"/g,/=/g,/</g,/>/g,/\r/g,/\n/g], ['&apos;','&#39;','&quot;','&#61;','&lt;','&gt;','&#10;','&#13;'] ) + '"' ;
+}
+
+function _FCK_ProtectEvents_RestoreEvents( match, encodedOriginal )
+{
+	return encodedOriginal.ReplaceAll( [/&#39;/g,/&quot;/g,/&#61;/g,/&lt;/g,/&gt;/g,/&#10;/g,/&#13;/g,/&apos;/g], ["'",'"','=','<','>','\r','\n','&'] ) ;
+}
+
 function _FCK_EditingArea_OnLoad()
 {
Index: /FCKeditor/branches/features/dataprocessor/editor/_source/internals/fck_gecko.js
===================================================================
--- /FCKeditor/branches/features/dataprocessor/editor/_source/internals/fck_gecko.js	(revision 244)
+++ /FCKeditor/branches/features/dataprocessor/editor/_source/internals/fck_gecko.js	(revision 245)
@@ -155,8 +155,8 @@
 	// Firefox can't handle correctly the editing of the STRONG and EM tags.
 	// We must replace them with B and I.
-		html = html.replace( FCKRegexLib.StrongOpener, '<b$1' ) ;
-		html = html.replace( FCKRegexLib.StrongCloser, '<\/b>' ) ;
-		html = html.replace( FCKRegexLib.EmOpener, '<i$1' ) ;
-		html = html.replace( FCKRegexLib.EmCloser, '<\/i>' ) ;
+	html = html.replace( FCKRegexLib.StrongOpener, '<b$1' ) ;
+	html = html.replace( FCKRegexLib.StrongCloser, '<\/b>' ) ;
+	html = html.replace( FCKRegexLib.EmOpener, '<i$1' ) ;
+	html = html.replace( FCKRegexLib.EmCloser, '<\/i>' ) ;
 
 	// Delete the actual selection.
Index: /FCKeditor/branches/features/dataprocessor/editor/_source/internals/fck_ie.js
===================================================================
--- /FCKeditor/branches/features/dataprocessor/editor/_source/internals/fck_ie.js	(revision 244)
+++ /FCKeditor/branches/features/dataprocessor/editor/_source/internals/fck_ie.js	(revision 245)
@@ -357,4 +357,23 @@
 	if ( url.length > 0 )
 	{
+		// If there are several images, and you try to link each one, all the images get inside the link:
+		// <img><img> -> <a><img></a><img> -> <a><img><img></a> due to the call to 'CreateLink' (bug in IE)
+		if (FCKSelection.GetType() == 'Control')
+		{
+			// Create a link
+			var oLink = this.EditorDocument.createElement( 'A' ) ;
+			oLink.href = url ;
+
+			// Get the selected object
+			var oControl = FCKSelection.GetSelectedElement() ;
+			// Put the link just before the object
+			oControl.parentNode.insertBefore(oLink, oControl) ;
+			// Move the object inside the link
+			oControl.parentNode.removeChild( oControl ) ;
+			oLink.appendChild( oControl ) ;
+			
+			return oLink ;
+		}
+
 		// Generate a temporary name for the link.
 		var sTempUrl = 'javascript:void(0);/*' + ( new Date().getTime() ) + '*/' ;
Index: /FCKeditor/branches/features/dataprocessor/editor/css/fck_internal.css
===================================================================
--- /FCKeditor/branches/features/dataprocessor/editor/css/fck_internal.css	(revision 244)
+++ /FCKeditor/branches/features/dataprocessor/editor/css/fck_internal.css	(revision 245)
@@ -43,5 +43,5 @@
 .FCK__Flash
 {
-	border: darkgray 1px solid;
+	border: #a9a9a9 1px solid;
 	background-position: center center;
 	background-image: url(images/fck_flashlogo.gif);
@@ -67,5 +67,5 @@
 {
 	border: 1px dotted #00F;
-	background-position: 1 center;
+	background-position: 1px center;
 	background-image: url(images/fck_anchor.gif);
 	background-repeat: no-repeat;
Index: /FCKeditor/branches/features/dataprocessor/editor/dialog/fck_listprop.html
===================================================================
--- /FCKeditor/branches/features/dataprocessor/editor/dialog/fck_listprop.html	(revision 244)
+++ /FCKeditor/branches/features/dataprocessor/editor/dialog/fck_listprop.html	(revision 245)
@@ -61,5 +61,5 @@
 	{
 		if ( oActiveEl.getAttribute('type') )
-			oActiveSel.value = oActiveEl.getAttribute('type').toLowerCase() ;
+			oActiveSel.value = oActiveEl.getAttribute('type') ;
 	}
 
Index: /FCKeditor/branches/features/dataprocessor/editor/plugins/bbcode/fckplugin.js
===================================================================
--- /FCKeditor/branches/features/dataprocessor/editor/plugins/bbcode/fckplugin.js	(revision 244)
+++ /FCKeditor/branches/features/dataprocessor/editor/plugins/bbcode/fckplugin.js	(revision 245)
@@ -100,5 +100,7 @@
 	 */
 	FixHtml : function( html )
-	{}
+	{
+		return html ;
+	}
 } ;
 
