How to stop AsAnsiString converting HTML tags

  • Hi
    I have a template system that also merges a cover email. I use

    Code
    emailBody := rte.AsANSIString('HTML-nomergefields');


    to convert the rtf to html for the email
    But one user has come up with a format that is not converting well.
    I think that if we could use our own html tags in the rtf editor that would remain as html in the conversion and not be converted from

    Zitat

    <div><font size="2">Here is the text with html aroud it</font></div>


    to

    Zitat

    &lt;div&gt;&lt;font size=&quot;2&quot;&gt;Here is the text with html around it&lt;/font&gt;&lt;/div&gt;


    We would be able to formatt the email better.

    is there a setting for this?

    The problem in format is
    a bullet point plus text followed by a
    cr tab plus text followed by a
    cr tab plus text followed by
    cr two tabs plus text (two lines of this)followed by a
    bullet point plus text.

    What we get after the conversion is this

    • If you are not in New Zealand already, please let us know the time and date of your arrival in Auckland (Albany). Our contact details are:
    Email: xxxxxxxxx@xxxxxxxxxxx
    Telephone: +xxxxxxxxxxxx during working hours 9.00am - 5.00pm Monday to Friday
    New Zealand standard time
    • +xxxxxxxxxxxx in the event of an emergency only outside working hours, or
    while in transit
    • Return your application for a xxxxxxxxxxxxxxx.

    Also the tab is putting in a -0.3in which does not produce a tab in html. Removal of the - makes it work.

    • Offizieller Beitrag

    emailBody := rte.AsANSIString('ANSI') will read the text including the tags and not convert it.

    If you send me a sample in RTF or WPT format I can check if it can convert to HTML. TABS usually cannot be converted to HTML.