HTML Encoded to #s

Last post 01-12-2006, 7:57 AM by julien. 5 replies.
Sort Posts: Previous Next
  •  01-12-2006, 2:32 AM 14633

    HTML Encoded to #s

    Hi,
    Yesterday, I decided to upgrade my Editors from v2 to v5 (big step). After some small issues, everything finally works...(almost !)
    My application uses a db to store and retreive the Editor's content. Whatever I type in the Editor is converted to ...#1#ed...It goes like this into the database, so when I retreive the data back from the db, it's unreadable - meaning the content is lost !
    Is there a specific way for storing data ? I used to HTMLEncode it, is this still valid ?
    Thanks for any help,
    Julien
     
    PS: Lorem Ipsum become : 2L#5r#9m ip#7um d#5l#5r #7it am#9t, c#5n#7#9t#9tur #7adip#7cing #9litr,#3nb#7p; #7#9d diam n#5numy #9irm#5d t#9mp#5r invidunt ut lab#5r#9 #9t d#5l#5r#9 magna aliquyam #9rat, #7#9d diam v#5luptua
  •  01-12-2006, 5:25 AM 14642 in reply to 14633

    Re: HTML Encoded to #s

    Julien,
     
    When upgrading have you updated the CuteEditor.dll and all the CuteEditor client files?
     
    Do you have problems with the samples included in the download package?
     
     

    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:50 AM 14648 in reply to 14642

    Re: HTML Encoded to #s

    Hi Adam,
    Thanks for your rapid response.
    _ I have copied all files/folders from v5/bin and cuteSoft_Client
    _ I use the licence coming with the demo (can I use my old licence file ?)
    _ I have no problems using the demos (with a localhost virtual dir on IIS)
     
    Code to render the Editor :

    .aspx : <CE:Editor  EnableFancyDropDownMenu="true"  id="txtBasePage"  runat="server" height="400"   ></CE:Editor>



    .vb :
     Private Sub createEditor(ByRef ed as Editor)  
      ed.ConfigurationPath = "~/CuteSoft_Client/CuteEditor/Configuration/vkbEditor.config"
      ed.EditorWysiwygModeCss = "~/styles/vkc.css"
      ed.EditorBodyStyle = "~/editor.aspx"
      ed.focus = True
      ed.AutoParseClasses = True
      ed.CodeViewTemplateItemList="Cut,Copy,Paste,Find,SelectAll " '<== Btw, this doesn't seem to work !
    [etc...]
     End Sub



    Code to input text to the Editor :

    'html is a ntext column in sqlServer 2K
       if not isdbnull(sqlReader("html")) then
         txtBasePage.text = server.htmlDecode(sqlReader("html"))
       end if


    Code to retrieve text from the Editor :

     Public Sub btnBasePageSave_Click(ByVal ....
      Dim t as String = Server.HtmlEncode(txtBasePage.Text)
      

    Thanks for any help !
    Julien



  •  01-12-2006, 5:59 AM 14650 in reply to 14648

    Re: HTML Encoded to #s

    Julien,
     
    Can you change the following code:

    Code to retrieve text from the Editor :

     Public Sub btnBasePageSave_Click(ByVal ....
      Dim t as String = Server.HtmlEncode(txtBasePage.Text)
      


    To
     
    No HtmlEncode here
        Public Sub btnBasePageSave_Click(ByVal ....
        Dim t as String = txtBasePage.Text 

     

    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, 6:31 AM 14656 in reply to 14650

    Re: HTML Encoded to #s

    Adam,
     
    No, that doesn't do the trick !
    I'll start a new project from your demo files and add my stuff on top to see where the problem lies.
    Thanks again,
    Julien
  •  01-12-2006, 7:57 AM 14664 in reply to 14656

    Re: HTML Encoded to #s

    Hi again,
    Well I found my problem :
    In my application, I save both the html code and the plain text. After reading some posts, in order to upgrade, I have used request("Editor1") to get the html and Editor1.PlainText to get the plain text.
    Of course, this doesn't work out (for the data validity) because after a postback, I store the new html value and the old plaintext value. For some reason, when the Editor1.plaintext is different form the Editor1.text, then I get the ###. I have added postback management in my code and it's fixed. I don't want to try to understand better than that - thanks for your help on this issue.
     
    Other questions :
    * can I use my old (paid for) licence file for using this v5 version ?
    * I can't get the Html view buttons to appear ; is this the CodeViewTemplateItemList property ?
    * I have similar problems as in other posts, regarding CSS :
    _ if my page starts with <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> I get all but the Editor to show correctly.
    _ if my page doesn't state the DOCTYPE, then only the Editor is correctly displaying.

    The Editor display problem is that the borders between the toolbar and the text area is VERY heigh, as well as between the bottom of the textarea and the "normal, html, preview" buttons.
    I have tried to tweek the styles.css.aspx (Office2003 theme) but without success. I have read the other posts on this topic but couldn't fix it...Could you help ?
    Thanks
    Julien
     
     
View as RSS news feed in XML