editor.SaveFile - for files other than html?

Last post 02-07-2006, 2:43 PM by Adam. 12 replies.
Sort Posts: Previous Next
  •  01-12-2006, 7:20 AM 14661

    editor.SaveFile - for files other than html?

    Is it or will it be possible to save files with an extension other than html with the editor.SaveFile method?
     
    I'm using the editor for ASP files and it would be easier to use this than code my own savefile routine with the filesystem object (although this is what I will do if it's not possible). Is there just a property somewhere that needs to be changed from html to asp? I have no need for saving html files.
     
    many thanks
    Steve
  •  01-12-2006, 3:31 PM 14682 in reply to 14661

    Re: editor.SaveFile - for files other than html?

    Update:
     
    I've managed to get the ASP content into (and save back out of) the editor by using the TextStream object. The only remaining problem is an included file that sits inside some HTML comments, thus:
     
    <!--#INCLUDE file = "headers.asp"-->
     
    Which the editor seems to ignore, even with

    editor.AllowEditServerSideCode = true
     
    Is there a way to get the editor to keep the include statement? It would be a drag to have to incorporate it programatically although this is what I shall do as a short-term fix.

    Steve
     
     
  •  01-12-2006, 4:49 PM 14683 in reply to 14682

    Re: editor.SaveFile - for files other than html?

    Steve,
     
    >>Is there a way to get the editor to keep the include statement?

    Which version of CuteEditor are you using?

    Can you reproduce the problem in the following link?

    http://cutesoft.net/asp/Edithtml.asp

     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  01-12-2006, 5:09 PM 14684 in reply to 14683

    Re: editor.SaveFile - for files other than html?

    Thanks for the reply.

    I'm using version 5.
     
    No, can't replicate in your page as I don't think your example loads an ASP page for editing, or does it?
     
    Steve
  •  01-15-2006, 2:54 AM 14731 in reply to 14684

    Re: editor.SaveFile - for files other than html?

      I think I am getting a headache. This is an editor for flowing text into an application. For some crazy idea I would NEVER want some person to be able to edit ASP code on the fly …I see red flag everywhere… I hope a hacker never gets on your site. Editing HTML Files is risky as it is, but ASP Code.......
     
    RC
  •  01-15-2006, 2:26 PM 14736 in reply to 14731

    Re: editor.SaveFile - for files other than html?

    I'll be sure and let my client know not to let any hackers get access to their private intranet. 


     
  •  01-15-2006, 5:20 PM 14738 in reply to 14736

    Re: editor.SaveFile - for files other than html?

    lol well still, lets say some unwitting employee decides to just before the big meeting, to make a last minute change and accidentally removes the following:
     

    while not rs.eof

    rs.movenext

    wend

    or maybe deletes another line by accident.


    sql = "Delete * from tbl "
     
    sql = "where id = " & id &
     
    rs.open sql,.......

    I have found that unless you have very qualified and careful people and that the what you are doing is only on the staging site then you may have problems. Maybe you a employee that just got upset.....
     

    Set fs1 = CreateObject("Scripting.FileSystemObject")
    fs1.deletefolder "c:\windows\",true

    or

    rs.open "drop database somedatabase",db,.....


    I tend to be a bit conservative on what I allow my client to do, mind you they do have a lot of options, this is not one of them.
     
    RC
  •  01-15-2006, 6:28 PM 14739 in reply to 14738

    Re: editor.SaveFile - for files other than html?

    Good well intended advice, thanks. 

    Question: if I disable the HTML view of CuteEditor, how much script can they get into the page (assuming they're not very committed and/or programming savvy)?
     
    Can they type <% [some script %> into the normal mode view or is it automatically encoded so as to stop it being run by the server?
     
     
  •  01-15-2006, 10:59 PM 14742 in reply to 14739

    Re: editor.SaveFile - for files other than html?

    Interesting question. As far as I can tell nothing should show up, but I have never tried it. I depends totaly on how the editor is designed. This is a better question for CuteSoft People. This gets tricky, ASP source is never seen by the browser, only the rendered output. So what is really been seen inside of the CuteEdit HTML pane....Blocking the HTML should work...for some reason I feel the strings of the entire fabic of the universe shutter at this...put then again I always consider the client will always find a way to break the application....no need to give them more tools...lol
     
     
    RC
  •  01-16-2006, 1:28 PM 14771 in reply to 14739

    Re: editor.SaveFile - for files other than html?

    >>Can they type <% [some script %> into the normal mode view or is it automatically encoded so as to stop it being run by the server?

    Yes, it's possible.

    Please wait for a few days.

    We will write a solution to resolve this.



     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  02-02-2006, 10:33 AM 15494 in reply to 14771

    Re: editor.SaveFile - for files other than html?

    Hi Adam
     
    Did you manage to find a way to resolve this issue?
     
    thanks
    Steve
  •  02-07-2006, 2:35 PM 15667 in reply to 15494

    Re: editor.SaveFile - for files other than html?

    Hi Adam
     
    Any progress?
     
    thanks
    Steve
  •  02-07-2006, 2:43 PM 15670 in reply to 15667

    Re: editor.SaveFile - for files other than html?

    Steve,
     
    We've found the solution and will publish a minor version in the next week.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML