Ticket #2363 (closed Bug: fixed)
IE7 Local Filesystem Permission Denied
| Reported by: | samuelms | Owned by: | fredck |
|---|---|---|---|
| Priority: | Normal | Milestone: | FCKeditor 2.6.3 |
| Component: | General | Version: | FCKeditor 2.6.2 |
| Keywords: | IE Review+ | Cc: | samuel_smith@… |
Description
This error occurs when loading a document into the fckeditor when running the editor from the filesystem. I am noticing that this error only occurs with very large files. I have a 288 KB html file (which unfortunately I cannot share) that causes this error to appear. Smaller files open in the editor just fine however.
I am setting the text of this file using the function
function SetHTML(html) {
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1'); oEditor.SetHTML(html, true);
};
where the html value passed in has the contents of the body of the page to be edited.
I cannot reproduce this error on the demo or on the latest demo. I tried to reproduce it by opening the source view, pasting in my code, and going back to the wysiwyg view.
I have isolated the problem (when it occurs for me) to the fckeditor/editor/_source/internals/fckdocumentprocessor.js file. Here are my changes to get it to work properly for me.
(starts around line 145)
return FCKTools.Merge( FCKDocumentProcessor.AppendNew(),
{
ProcessDocument : function( doc ) {
// Firefox 3 would sometimes throw an unknown exception while accessing EMBEDs and OBJECTs // without the setTimeout(). FCKTools.RunFunction( function()
{
/*
- My Change: Removed because access to the doc is being denied in
- IE7 when loaded from local filesystem * *
// Process OBJECTs first, since EMBEDs can sometimes go inside OBJECTS (e.g. Flash). var aObjects = doc.getElementsByTagName( 'object' ); for ( var i = aObjects.length - 1 ; i >= 0 ; i-- )
processElement( aObjects[i] ) ;
// Now process any EMBEDs left. var aEmbeds = doc.getElementsByTagName( 'embed' ) ; for ( var i = aEmbeds.length - 1 ; i >= 0 ; i-- )
processElement( aEmbeds[i] ) ;
*
- End of my changes
*/
} ) ;
},
I just commented out the logic that was happening. For whatever reason access to the doc variable was denied. Trying to access any variable inside the doc variable causes a permission denied error.