Skip to content

Html "BACKGROUND-COLOR=windows" results in Background black #9

@jl-rey

Description

@jl-rey

The HtmlToXamlConveter miss handles the following html fragment

#-- Html Fragment ---

<P style="TEXT-ALIGN: left"><SPAN style="COLOR: black"><SPAN 
style="BACKGROUND-COLOR: window"><SPAN 
style="FONT-SIZE: 9pt; FONT-FAMILY: Segoe UI">The </SPAN><SPAN 
style="COLOR: red">gospel </SPAN><SPAN style="COLOR: black">was </SPAN><SPAN 
style="COLOR: blue">heard </SPAN><SPAN style="COLOR: black">by the </SPAN><SPAN 
style="COLOR: seagreen">saints</SPAN></SPAN></SPAN></P>

--- end Html fragment ---

Note: the <SPAN style="BACKGROUND-COLOR: window"> This is miss handled to the following.

XamlText = HtmlToXamlConverter.ConvertHtmlToXaml(htmlFragment, false); 

#--- XamlText result ---

<Section xml:space="preserve" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"><Paragraph TextAlignment="left"><Span Foreground="black"><Span Background="black"><Run FontSize="9pt" FontFamily="segoe ui">The </Run><Run Foreground="red">gospel </Run><Run Foreground="black">was </Run><Run Foreground="blue">heard </Run><Run Foreground="black">by the </Run><Run Foreground="seagreen">saints</Run></Span></Span></Paragraph></Section>

Note the <Span Foreground="black">

Found work around by removing the following the result has no background color:

style="BACKGROUND-COLOR: window"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions