HTML To RTF conversion loses the < character

Last post 08-27-2008, 10:18 PM by Adam. 9 replies.
Sort Posts: Previous Next
  •  08-22-2008, 2:31 AM 43163

    HTML To RTF conversion loses the < character

    Hi
     
    I've noticed that using HTML2RTF() function will remove any < or > characters in the converted string. For instance if I enter an expression such as "a <= b if b >= c" after the conversion it becomes a = c. The converter is treating this <> as a html tag and removing everything in between, (btw I am using a PasteText setting).
     
    However in if the angle brackets are not facing each other as a pair > is left but < is always removed. for instance  > <
    becomes >. I know it is because I am using the PasteText setting to strip html from pasted text, but it should not strip tags that are not legimate html opening and closing tags. My users will be entering a lot of maths expressions so you can see the problems

    any ideas or work arounds please asap


    thanks
     
  •  08-22-2008, 2:07 PM 43196 in reply to 43163

    Re: HTML To RTF conversion loses the < character

  •  08-24-2008, 7:44 AM 43212 in reply to 43196

    Re: HTML To RTF conversion loses the < character

    No, I'm not. You sent this to me before, it doesn't work, it expects perfectly formed xhtml and as you know the html produced by cute editor is not xhtml, still even with perfectly formed xhtml, it doesn't work as I passesd in some simple strings and the result is as we discussed previously in the following post. http://cutesoft.net/forums/thread/42626.aspx. So unless you have fixed it since, I'm sure the result will be the same, if you have then please send the new version to me as I am having to write lots of replace functions to make up for the inconsistencies in the current rtf converter. 
     
    Otherwise is there any of your developers who could give me a workround to make the < appear with the current version
     
    thanks
  •  08-26-2008, 5:06 PM 43288 in reply to 43212

    Re: HTML To RTF conversion loses the < character

    As I noted before, cute editor support staff really need to get their act together on the forum. If you are going to promote your product as the leading text editor in a commercial environment then you should aim to have a leading support forum.
    This forum, IMO falls way short.
    When you are supporting a developers product, the biggest part of your clientel will be developers who are usually implementing your product for their clients. I should not have to wait up to one week to even get a reply let alone a solution. So just FYI what I've noticed is:
     
    1. There seems to be only one support staff answering questions, i.e Adam
    2. No disrepect but Adam does not seem to know very much about the technical aspects of the product
    3. Issues are not dealt with in a thorough manner, normal process involves (again in my experience)
        a. Ignore the question for as long as possible
        b. Reply with the barest of answers which usually involves asking a non important question
        c. Hold off on answering the reply until the questioner asks for an answer
        d. Supply another answer that has already been tried before and has already failed before
        e. If solution cannot be found then don't bother answering anymore.
     
    If you cannot resolve an issue you should just say so, it leaves a much worse impression on the client to ignore them. I supply product support to my clients continually, if I acted in the same manner as the cute editor product support does, I would lose contracts.
     
    Not trying to be facisious, Just providing feedback on how I think your support forum measures up in professionalism stakes...
  •  08-26-2008, 8:34 PM 43295 in reply to 43163

    Re: HTML To RTF conversion loses the < character

    MarkHolden:
    Hi
     
    I've noticed that using HTML2RTF() function will remove any < or > characters in the converted string. For instance if I enter an expression such as "a <= b if b >= c" after the conversion it becomes a = c. The converter is treating this <> as a html tag and removing everything in between, (btw I am using a PasteText setting).
     
    However in if the angle brackets are not facing each other as a pair > is left but < is always removed. for instance  > <
    becomes >. I know it is because I am using the PasteText setting to strip html from pasted text, but it should not strip tags that are not legimate html opening and closing tags. My users will be entering a lot of maths expressions so you can see the problems

    any ideas or work arounds please asap


    thanks
     
     
    I tested the following example using your code it works OK.
     
     
    Can you try this example? The source code of this example is 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

  •  08-26-2008, 8:43 PM 43296 in reply to 43288

    Re: HTML To RTF conversion loses the < character

    >>1. There seems to be only one support staff answering questions, i.e Adam
     
    We are addding two more support staffs into this support team.
     
    >>2. No disrepect but Adam does not seem to know very much about the technical aspects of the product
     
    Cute Editor is a big project. If you have any questions about core editor funtions, I can answer most of them because I am one of the developers of this project.
    However if you have questions related to Online Image Editor, PDF converter, RTF converter, XHTML conversion, I do need help from other developers.
     
    >> Issues are not dealt with in a thorough manner, normal process involves (again in my experience)
        a. Ignore the question for as long as possible 
        b. Reply with the barest of answers which usually involves asking a non important question
        c. Hold off on answering the reply until the questioner asks for an answer
        d. Supply another answer that has already been tried before and has already failed before
        e. If solution cannot be found then don't bother answering anymore.

    No true. I am doing my best to answer your questions.
    >>If you cannot resolve an issue you should just say so, it leaves a much worse impression on the client to ignore them. I supply product support to my clients continually, if I acted in the same manner as the cute editor product support does, I would lose contracts.
     
    When you report a new issue, the first step we are trying to do is reproducing it in our online demo. If we cann't reproduct it, we will suggest you try our online demo. Then tell us the steps showing the problems.
     
    I am doing my best to help our clients. However I know this RTF converter is not perfect. This version (http://richtextbox.com/test/pdf/demo.aspx) also have some bugs.  I understand your frustration.

    Right now we are developing a new RTF converter. Hope we can resolve all related problems with this new version.

     

    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

  •  08-27-2008, 12:06 AM 43299 in reply to 43296

    Re: HTML To RTF conversion loses the < character

    Adam
     
    Thanks for your reply, I am sure you are doing your best because you are the only support staff and I understand that any one developer cannot know everything about the product, so it is a good thing that you are adding more support staff, the most frustrating part of the cute editor support experience is to be left hanging without any idea of what is going on. In my experience I believe I would not have gotten any replies unless I kept pushing the issue, I could be wrong but I was not hearing anything for a few days. It would be good to at least respond with a "sorry don't know the answer we are looking into this issue, will get back as soon as we have a result", this would be much more preferable, than nothing at all.
    As I said just giving my feedback on what I see on the forum, I'm not intending to be nasty, but you are right it is frustrating.
     
     
    with my issue:
    There is one crucial difference between your demo page and my set up and that is that I am using EditorOnPaste="PasteText", which strips out all the html tags. Your demo is set to EditorOnPaste="Default", which of course works because it does not see <> as a html tag. Try changing it to EditorOnPaste="PasteText" and see the difference, I believe you will see the same result.


    so if you (or the rtf developer) has any ideas on how I can overcome this that would be great, if not then i'll just have to wait until the  rtf converter is ready.
     
    Thanks
  •  08-27-2008, 9:23 PM 43323 in reply to 43299

    Re: HTML To RTF conversion loses the < character

    MarkHolden,
     
    EditorOnPaste="PasteText" should not have any impact to RTF feature.
     
    Please try this new demo. In this demo page, I've set EditorOnPaste="PasteText".
     
    a <= b if b >= c

    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

  •  08-27-2008, 10:04 PM 43326 in reply to 43323

    Re: HTML To RTF conversion loses the < character

    Hi Adam
     
    I think you forgot to reference the link, no matter, you are right the EditorOnPaste setting is irrelevant to the convert RTF function, I was getting my data from a string placed in a SQL db by ce, however, here is a much more concise way to reporduce my issue, passing the string directly to the converter...
     
      Dim cuteconvertor As New CuteEditor.Convertor.RTF.HTML2RTF("a <= b if b >= c")
                strRTF = cuteconvertor.RTF

     
    The result of strRTF will be "a = c", it is a converter issue and until the new converter is in place is there any way around this..
     
    Thanks
     


  •  08-27-2008, 10:18 PM 43327 in reply to 43326

    Re: HTML To RTF conversion loses the < character

     
    You should pass HTML code into HTML2RTF funtion.
     
    a <= b if b >= c should be converted into a &lt;= b if b &gt;= c.

    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