Ticket #1645: 1645_2.patch

File 1645_2.patch, 2.0 KB (added by fredck, 21 months ago)
  • _whatsnew.html

     
    6767                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2322">#2322</a>] Fixed the issue 
    6868                        where the fit window command loses the current selection and scroll position in the 
    6969                        editing area.</li> 
     70                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1645">#1645</a>] Added warning message 
     71                        about Firefox 3's strict origin policy.</li> 
    7072        </ul> 
    7173        <p> 
    7274                <a href="_whatsnew_history.html">See previous versions history</a></p> 
  • editor/fckeditor.html

     
    3131        @Packager.RemoveLine --> 
    3232        <script type="text/javascript"> 
    3333 
     34// #1645: Alert the user if opening FCKeditor in FF3 from local filesystem 
     35// without security.fileuri.strict_origin_policy disabled. 
     36if ( document.location.protocol == 'file:' ) 
     37{ 
     38        try 
     39        { 
     40                window.parent.document.domain ; 
     41        } 
     42        catch ( e ) 
     43        { 
     44                window.addEventListener( 'load', function() 
     45                        { 
     46                                document.body.innerHTML = '\ 
     47                                        <div style="border: 1px red solid; font-family: arial; font-size: 12px; color: red; padding:10px;">\ 
     48                                                <p>\ 
     49                                                        <b>Your browser security settings don\'t allow FCKeditor to be opened from\ 
     50                                                        the local filesystem.<\/b>\ 
     51                                                <\/p>\ 
     52                                                <p>\ 
     53                                                        Please open the <b>about:config<\/b> page and disable the\ 
     54                                                        &quot;security.fileuri.strict_origin_policy&quot; option; then load this page again.\ 
     55                                                <\/p>\ 
     56                                                <p>\ 
     57                                                        Check our <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/FAQ#ff3perms">FAQ<\/a>\ 
     58                                                        for more information.\ 
     59                                                <\/p>\ 
     60                                        <\/div>' ; 
     61                        }, false ) ; 
     62        } 
     63} 
     64 
    3465// Save a reference to the default domain. 
    3566var FCK_ORIGINAL_DOMAIN ; 
    3667