Show
Ignore:
Timestamp:
2008-06-12 11:52:09 (7 months ago)
Author:
fredck
Message:

Fixed #2115 : Fixed JavaScript (permission denied) error in Firefox when file has been uploaded.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/filemanager/connectors/lasso/upload.lasso

    r1797 r2059  
    7575                -description='Sets the HTML response for the FCKEditor Quick Upload feature.' 
    7676        ); 
    77                 $__html_reply__ = '\ 
    78 <script type="text/javascript"> 
    79 (function() 
    80 { 
    81         var d = document.domain ; 
    82  
    83         while ( true ) 
    84         { 
    85                 // Test if we can access a parent property. 
    86                 try 
    87                 { 
    88                         var test = window.top.opener.document.domain ; 
    89                         break ; 
    90                 } 
    91                 catch( e ) {} 
    92  
    93                 // Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ... 
    94                 d = d.replace( /.*?(?:\\.|$)/, "" ) ; 
    95  
    96                 if ( d.length == 0 ) 
    97                         break ;         // It was not able to detect the domain. 
    98  
    99                 try 
    100                 { 
    101                         document.domain = d ; 
    102                 } 
    103                 catch (e) 
    104                 { 
    105                         break ; 
    106                 } 
    107         } 
    108 })() ; 
     77                 
     78                $__html_reply__ = '<script type="text/javascript">'; 
     79                 
     80                // Minified version of the document.domain automatic fix script (#1919).  
     81                // The original script can be found at _dev/domain_fix_template.js 
     82                // Note: in Lasso replace \ with \\ 
     83                $__html_reply__ = $__html_reply__ + "(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();"; 
     84                 
     85                $__html_reply__ = $__html_reply__ + '\ 
    10986        window.parent.OnUploadCompleted(' + #errorNumber + ',"' 
    11087                + string_replace(#fileUrl, -find='"', -replace='\\"') + '","'