Index: /FCKeditor/trunk/_whatsnew.html
===================================================================
--- /FCKeditor/trunk/_whatsnew.html (revision 146)
+++ /FCKeditor/trunk/_whatsnew.html (revision 147)
@@ -55,4 +55,7 @@
[SF
BUG-1288609] The content of iframes are preserved.
+ [SF
+ BUG-1245504] [SF
+ BUG-1652240] Flash files without the .swf extension weren't recognized upon reload.
Index: /FCKeditor/trunk/editor/_source/internals/fckdocumentprocessor.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fckdocumentprocessor.js (revision 146)
+++ /FCKeditor/trunk/editor/_source/internals/fckdocumentprocessor.js (revision 147)
@@ -134,5 +134,11 @@
while ( i >= 0 && ( oEmbed = aEmbeds[i--] ) )
{
- if ( oEmbed.src.EndsWith( '.swf', true ) )
+ // IE doesn't return the type attribute with oEmbed.type or oEmbed.getAttribute("type")
+ // But it turns out that after accessing it then it doesn't gets copied later
+ var oType = oEmbed.attributes[ 'type' ] ;
+
+ // Check the extension and the type. Now it should be enough with just the type
+ // Opera doesn't return oEmbed.src so oEmbed.src.EndsWith will fail
+ if ( (oEmbed.src && oEmbed.src.EndsWith( '.swf', true )) || ( oType && oType.nodeValue == 'application/x-shockwave-flash' ) )
{
var oCloned = oEmbed.cloneNode( true ) ;
@@ -148,4 +154,6 @@
if ( oAtt ) oCloned.setAttribute( aAttributes[iAtt], oAtt ) ;
}
+ // It magically gets lost after reading it in oType
+ oCloned.setAttribute( 'type', oType.nodeValue ) ;
}