0

When I try to open a small text file (<1kB), the text editor either shows nothing (blank page) or something like this (in source editor):

<html><body><script>document.cookie=’eeeeeee=a026c7c8eeeeeee_a026c7c8; path=/’;window.location.href=window.location.href;</script></body></html>

Whenever I download a small file, the file ends up being empty.

If I used something else like filezilla, the file is not empty after download.

There doesn’t appear to be any error in the response or console. Works just fine for larger files. The server is running php 5.3.8. Any ideas?

edit:

class.TextEditor.js relevant code that runs when opening a text file:

loadFileContent : function(fileName){
    this.currentFile = fileName;
    var connexion = new Connexion();
    connexion.addParameter('get_action', 'get_content');
    connexion.addParameter('file', fileName);   
    connexion.onComplete = function(transp){
        this.parseTxt(transp);
        this.updateTitle(getBaseName(fileName));
    }.bind(this);
    this.setModified(false);
    this.setOnLoad(this.textareaContainer);
    connexion.sendAsync();
},
Michal
  • 15,429
  • 10
  • 73
  • 104
Oaysis
  • 1
  • 1
  • what code are you using to open the file? does the name of the file have any characters in it that need escaping? – chiliNUT Aug 06 '13 at 23:15
  • The file name does not have any characters that need escaping. This is what's in class.TextEditor.js: edit: posting above – Oaysis Aug 07 '13 at 00:03

0 Answers0