Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html (revision 5740)
+++ /CKEditor/trunk/CHANGES.html (revision 5741)
@@ -90,4 +90,5 @@
#5338 : Pasting from Open Office could lead on error.
#5224 : Some invalid markup could break the editor.
+ #5455 : It was not possible to remove formatting from pasted content on specific cases.
Updated the following language files:
- #5962 : German;
Index: /CKEditor/trunk/_source/core/dom/element.js
===================================================================
--- /CKEditor/trunk/_source/core/dom/element.js (revision 5740)
+++ /CKEditor/trunk/_source/core/dom/element.js (revision 5741)
@@ -851,6 +851,14 @@
function()
{
- var attributes = this.$.attributes;
- return ( attributes.length > 1 || ( attributes.length == 1 && attributes[0].nodeName != '_cke_expando' ) );
+ var attrs = this.$.attributes,
+ attrsNum = attrs.length;
+
+ // The _moz_dirty attribute might get into the element after pasting (#5455)
+ var execludeAttrs = { _cke_expando : 1, _moz_dirty : 1 };
+
+ return attrsNum > 0 &&
+ ( attrsNum > 2 ||
+ !execludeAttrs[ attrs[0].nodeName ] ||
+ ( attrsNum == 2 && !execludeAttrs[ attrs[1].nodeName ] ) );
},