Index: /FCKeditor/trunk/_whatsnew.html
===================================================================
--- /FCKeditor/trunk/_whatsnew.html	(revision 1602)
+++ /FCKeditor/trunk/_whatsnew.html	(revision 1603)
@@ -142,4 +142,7 @@
 			additional fifth parameter "customData" that will be send to the Execute method of the command for that 
 			menu item, allowing a single command to be used for different menu items..</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1502">#1502</a>] The RemoveFormat command now
+			also removes the attributes from the cleaned text. The list of attributes is configurable with 
+			FCKConfig.RemoveAttributes.</li>
 	</ul>
 	<p>
Index: /FCKeditor/trunk/editor/_source/internals/fckconfig.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fckconfig.js	(revision 1602)
+++ /FCKeditor/trunk/editor/_source/internals/fckconfig.js	(revision 1603)
@@ -136,4 +136,7 @@
 	if ( !sComboPreviewCSS || sComboPreviewCSS.length == 0 )
 		oConfig.ToolbarComboPreviewCSS = oConfig.EditorAreaCSS ;
+
+	// Turn the attributes that will be removed in the RemoveFormat from a string to an array
+	oConfig.RemoveAttributesArray = (oConfig.RemoveAttributes || '').split( ',' );
 }
 
Index: /FCKeditor/trunk/editor/_source/internals/fckdomtools.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fckdomtools.js	(revision 1602)
+++ /FCKeditor/trunk/editor/_source/internals/fckdomtools.js	(revision 1603)
@@ -517,4 +517,13 @@
 		return element.removeAttribute( attributeName, 0 ) ;
 	},
+
+	/**
+	 * Removes an array of attributes from an element
+	 */
+	RemoveAttributes : function (element, aAttributes )
+	{
+		for ( var i = 0 ; i < aAttributes.length ; i++ )
+			this.RemoveAttribute( element, aAttributes[i] );
+	}, 
 
 	GetAttributeValue : function( element, att )
Index: /FCKeditor/trunk/editor/_source/internals/fckstyles.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fckstyles.js	(revision 1602)
+++ /FCKeditor/trunk/editor/_source/internals/fckstyles.js	(revision 1603)
@@ -211,4 +211,6 @@
 			if ( tagsRegex.test( currentNode.nodeName ) )
 				FCKDomTools.RemoveNode( currentNode, true ) ;
+			else
+				FCKDomTools.RemoveAttributes( currentNode, FCKConfig.RemoveAttributesArray );
 
 			currentNode = nextNode ;
Index: /FCKeditor/trunk/fckconfig.js
===================================================================
--- /FCKeditor/trunk/fckconfig.js	(revision 1602)
+++ /FCKeditor/trunk/fckconfig.js	(revision 1603)
@@ -193,4 +193,7 @@
 FCKConfig.RemoveFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var' ;
 
+// Attributes that will be removed 
+FCKConfig.RemoveAttributes = 'class,style,lang,width,height,align,hspace,valign' ;
+
 FCKConfig.CustomStyles =
 {
