The question is about the output of this code:
Telerik.WinForms.Documents.FormatProviders.Html.HtmlFormatProvider fmt =
new
Telerik.WinForms.Documents.FormatProviders.Html.HtmlFormatProvider();
fmt.ExportSettings.StylesExportMode = Telerik.WinForms.Documents.FormatProviders.Html.StylesExportMode.Inline;
RadDocument rad = fmt.Import(
"The following word is <i>italic</i>."
);
string
html = fmt.Export(rad);
The HTML output contains:
<
span
style
=
"font-family: 'Times New Roman';font-style: Italic;font-size: 16px;"
>italic</
span
>
It seems as though some HTML parsers don't regard "font-style: Italic" as a valid font-style. However, if I replace it with "font-style: italic" it works just fine. The client in question is GMail's HTML email viewer, but I'm sure there are others.
The only standard I can find related to this is the SVG 1.1 standard which states:
Keyword values, such as italic in font-style="italic", are also case-sensitive and must be specified using the exact case used in the specification which defines the given keyword.
Obviously the DOCTYPE is xhtml, not an SVG file, but the premise that certain standards expect this particular word to be lowercase lends to the fact that in certain situations "Italic" vs. "italic" does matter.
For the time being I'll just manually replace this substring in all of my HTML documents, but it would be nice if the RadDocument / HtmlFormatProvider guys could implement a permanent fix for this.