Re: Cute Editor injecting code from Firefox add-ins

  •  03-15-2010, 12:31 PM

    Re: Cute Editor injecting code from Firefox add-ins

    vanclute:
    I don't see how that's helpful at all, I can't simply remove all <script> tags as I need my users to be able to place javascript in their templates.  This solution would prevent that completely.
     
    I need a solution that prevents third party applications from injecting code into your editor.  That doesn't seem like too much to ask as they shouldn't be able to do it in the first place.
     
    Jonathan
     
    EDIT:  Please remember that this is not a Skype issue.  This happens with LastPass as well as Skype, and probably others that we just haven't seen as well.  There is no way to determine who's code we would be removing by HTML tags.
     
    vanclute,
     
    I don't mean to ask you to remove all javascript code. There are must be some differences between your own javascript code and the code inserted by Skype.

    The customzied code filter allows you write a regular expression. You can use it to remove any code you don't like.
     
    The following filter remove all <form></form> tags:

     

    1. <script type="text/javascript">          
    2. function CuteEditor_FilterHTML(editor,code)       
    3. {       
    4.     return code.replace(/(<form[^\>]*\>)([\s\S]*)(\<\/form\>)/i, "$2");       
    5. }       
    6. function CuteEditor_FilterCode(editor,code)       
    7. {       
    8.     return code.replace(/(<form[^\>]*\>)([\s\S]*)(\<\/form\>)/i, "$2");       
    9. }       
    10. </script>   

     


    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 Complete Thread