Changeset 147

Show
Ignore:
Timestamp:
2007-02-18 14:45:13 (3 years ago)
Author:
alfonsoml
Message:

Fix for SF Bug 1245504 and 1652240: Flash files without the .swf extension weren't recognized upon reload. Also they weren't recognized anyway in Opera.

Location:
FCKeditor/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/internals/fckdocumentprocessor.js

    r143 r147  
    134134        while ( i >= 0 && ( oEmbed = aEmbeds[i--] ) ) 
    135135        { 
    136                 if ( oEmbed.src.EndsWith( '.swf', true ) ) 
     136                // IE doesn't return the type attribute with oEmbed.type or oEmbed.getAttribute("type")  
     137                // But it turns out that after accessing it then it doesn't gets copied later 
     138                var oType = oEmbed.attributes[ 'type' ] ; 
     139 
     140                // Check the extension and the type. Now it should be enough with just the type 
     141                // Opera doesn't return oEmbed.src so oEmbed.src.EndsWith will fail 
     142                if ( (oEmbed.src && oEmbed.src.EndsWith( '.swf', true )) || ( oType && oType.nodeValue == 'application/x-shockwave-flash' ) ) 
    137143                { 
    138144                        var oCloned = oEmbed.cloneNode( true ) ; 
     
    148154                                        if ( oAtt ) oCloned.setAttribute( aAttributes[iAtt], oAtt ) ; 
    149155                                } 
     156                                // It magically gets lost after reading it in oType 
     157                                oCloned.setAttribute( 'type', oType.nodeValue ) ; 
    150158                        } 
    151159 
  • FCKeditor/trunk/_whatsnew.html

    r146 r147  
    5555                <li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1288609&group_id=75348">SF 
    5656                        BUG-1288609</a>] The content of iframes are preserved.</li> 
     57                <li>[<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1245504&group_id=75348">SF 
     58                        BUG-1245504</a>] [<a target="_blank" href="https://sourceforge.net/tracker/?func=detail&atid=543653&aid=1652240&group_id=75348">SF 
     59                                BUG-1652240</a>] Flash files without the .swf extension weren't recognized upon reload.</li> 
    5760        </ul> 
    5861        <h3>