Ticket #2113: 2113.patch

File 2113.patch, 1.5 KB (added by martinkou, 9 months ago)
  • _whatsnew.html

     
    4949                        fckstyles.xml in servers which cannot return the correct content type header for .xml files.</li> 
    5050                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2102">#2102</a>] Fixed FCKConfig.DocType 
    5151                        which stopped working in FCKeditor 2.6.</li> 
     52                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2113">#2113</a>] Fixed unneeded &lt;span 
     53                        class=&quot;Apple-style-span&quot;&gt; created after inserting special characters.</li> 
    5254        </ul> 
    5355        <h3> 
    5456                Version 2.6</h3> 
  • editor/dialog/fck_specialchar.html

     
    4444{ 
    4545        oEditor.FCKUndo.SaveUndoStep() ; 
    4646        oEditor.FCK.InsertHtml( charValue || "" ) ; 
     47 
     48        // Kludge for Safari bug #2113. 
     49        if ( oEditor.FCKBrowserInfo.IsSafari ) 
     50        { 
     51                var oRange = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ; 
     52                oRange.MoveToSelection() ; 
     53                var oBookmark = oRange.CreateBookmark() ; 
     54 
     55                var aSpans = oEditor.FCK.EditorDocument.getElementsByTagName( 'span' ) ; 
     56                for ( var i = 0 ; i < aSpans.length ; i++ ) 
     57                        ( aSpans[i].className == 'Apple-style-span' ) && oEditor.FCKDomTools.RemoveNode( aSpans[i], true ) ; 
     58 
     59                oRange.MoveToBookmark( oBookmark ) ; 
     60                oRange.Select() ; 
     61        } 
     62 
    4763        window.parent.Cancel() ; 
    4864} 
    4965