Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 3777)
+++ /CKEditor/trunk/CHANGES.html	(revision 3778)
@@ -63,4 +63,6 @@
 		<li><a href="http://dev.fckeditor.net/ticket/3821">#3821</a> : Fixed an issue with JAWS in which
 			toolbar items are read inconsistently between virtual cursor modes.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/3789">#3789</a> : The &quot;src&quot; attribute 
+			was getting duplicated in some situations.</li>
 	</ul>
 	<h3>
Index: /CKEditor/trunk/_source/plugins/htmldataprocessor/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/htmldataprocessor/plugin.js	(revision 3777)
+++ /CKEditor/trunk/_source/plugins/htmldataprocessor/plugin.js	(revision 3778)
@@ -92,15 +92,4 @@
 		defaultDataBlockFilterRules.elements[ i ] = extendBlockForDisplay;
 
-	/**
-	 * IE sucks with dynamic 'name' attribute after element is created, '_cke_saved_name' is used instead for this attribute.
-	 */
-	var removeName = function( element )
-	{
-		var attribs = element.attributes;
-
-		if ( attribs._cke_saved_name )
-			delete attribs.name;
-	};
-
 	var defaultHtmlFilterRules =
 		{
@@ -125,4 +114,22 @@
 			elements :
 			{
+				$ : function( element )	
+				{
+					// Remove duplicated attributes - #3789.
+					var attribs = element.attributes;
+
+					if ( attribs )
+					{
+						// Remove duplicates that have been saved with our
+						// special names.
+						if ( attribs._cke_saved_name )
+							delete attribs.name;
+						if ( attribs._cke_saved_href )
+							delete attribs.href;
+						if ( attribs._cke_saved_src )
+							delete attribs.src;
+					}
+				},
+
 				embed : function( element )
 				{
@@ -136,30 +143,5 @@
 						element.attributes.height = parent.attributes.height;
 					}
-				},
-
-				img : function( element )
-				{
-					var attribs = element.attributes;
-
-					if ( attribs._cke_saved_name )
-						delete attribs.name;
-					if ( attribs._cke_saved_src )
-						delete attribs.src;
-				},
-
-				a : function( element )
-				{
-					var attribs = element.attributes;
-
-					if ( attribs._cke_saved_name )
-						delete attribs.name;
-					if ( attribs._cke_saved_href )
-						delete attribs.href;
-				},
-
-				input : removeName,
-				textarea : removeName,
-				select : removeName,
-				form : removeName
+				}
 			},
 
