HTML Comment

Giganews Newsgroups
Subject: HTML Comment
Posted by:  John E. Wilfong (j[nospam]wilfong@[reversethis]moc.loa)
Date: Sun, 23 Oct 2005

D7Pro | Indy 10  | TidSMTP & TidMessage

I've finally got html email to work! But there is one problem. After hours
of testing and sending sample emails I finally got to the root of the
problem I'm experiencing. When embedding html into the body of an email
all formatting was being lost!

Indy is sending email just great but has problems with CSS. In the html
I'm sending it has . . .

<STYLE TYPE="text/css"><!--
.Style0 { border-style . . .

. . .


. . . in the <head> section of the html.

It is common practice for the CSS Style element to embed Styles within a
comment for older browser compatibility but indy changes every 0d0a (Hex)
within the comment to 7f (Hex) and the styles are not rendered. Quick
workaround is to delete the '--'  (Actually '<!-- and -->' but I think the
'--' is the real problem) but I rather not have to go through this manual

Is there something else that can be done to get these CSS styles to work
without having to parse the html and delete the comment characters?