Cute Editor changing my url's

Last post 06-14-2010, 1:42 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  06-13-2010, 7:25 PM 61707

    Cute Editor changing my url's

    I have a single SQL database where I'm saving html to support multiple websites.   I have a single website where I maintain the html in the SQL database using Cute Editor.   So, when I include url's and links, etc in my html I code them either specifically for a given site or as a relative link.   In any case, I want those links NOT TOUCHED by Cute Editor.  I know how I want them coded and I DO NOT want Cute Editor trying to interpret what I meant.   I believe I have Cute Editor configured correctly.   I.E. I left the default setting for "URLType", I have it set to "default" which when I read the documentation it says Cute Editor WILL NOT change my url's which is exactly what I want.   I DID NOT choose "Site Relative" or "Absolute."  

    My problem is when I have the following saved in the SQL table: "<td style="background-image: url(images/button.gif); background-repeat: no-repeat; background-position: center 50%" height="22" align="center">"

      the Cute Editor insists on displaying it like this when I bring it up for editing: <td style="background-image: url(http://www.tpmssource.com/Admin/images/button.gif); background-repeat: no-repeat; background-position: center 50%" height="22" align="center">

    As you can see, the Cute Editor took it upon itself to convert my relative link to an absolute link based on the site where I'm doing the maintenance.   But that site IS NOT the same as the site I'm doing the maintenance for.    I just need Cute Editor to leave my relative link alone!
    This is a MAJOR problem for me.   I DO NOT WANT Cute Editor changing my url in any way.   Please help!   Tell me what setting I need to use or let me know if this is a bug and what hotfix I need.

  •  06-14-2010, 1:42 AM 61711 in reply to 61707

    Re: Cute Editor changing my url's

    Hi broble,

    Try add the below THML filter in the editor page

     <script>
    function CuteEditor_FilterHTML(editor,code)
    {
        return code.replace("url(http://www.tpmssource.com/Admin/", "url(");
    }
    function CuteEditor_FilterCode(editor,code)
    {
        return code.replace("url(http://www.tpmssource.com/Admin/", "url(");
    }
    </script>
     
    For example
     
    1. <%@ Page Language="C#" %>   
    2.   
    3. <%@ Register Namespace="CuteEditor" Assembly="CuteEditor" TagPrefix="CE" %>   
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   
    5.   
    6. <html xmlns="http://www.w3.org/1999/xhtml">   
    7. <head id="Head1" runat="server">   
    8.     <title>Untitled Page</title>   
    9. </head>   
    10. <body>   
    11.     <form id="form1" runat="server">   
    12.         <div>   
    13.             <CE:Editor ID="editor1" runat="server">   
    14.             </CE:Editor>   
    15.         </div>   
    16.     </form>   
    17. </body>   
    18. </html>   
    19.   
    20. <script>   
    21.   
    22. function CuteEditor_FilterHTML(editor,code)   
    23. {   
    24.  return code.replace("url(http://www.tpmssource.com/Admin/""url(");   
    25. }   
    26. function CuteEditor_FilterCode(editor,code)   
    27. {   
    28.  return code.replace("url(http://www.tpmssource.com/Admin/""url(");   
    29. }   
    30. </script>  
    Regards,
     
    ken

     

View as RSS news feed in XML