PreMailer.Net
PreMailer.Net copied to clipboard
MoveCssInline is HTML encoding CSS
I have my HTML content in a string, and my CSS content in another string.
I call PreMailer.MoveCssInline(content, css: csscontent) but the output seems to be HTML encoding certain things from the CSS, for example, my CSS has this line:
font-family: "Roboto", sans-serif;
which gets outputted as this:
<p style="font-family: "Roboto",sans-serif"></p>
I could move everything to single quotes, which it seems to handle, but it seems like using a hammer to crack a nut (and my CSS preprocessor/minimizer seems to output with double quotes anyway).
Seems to be a result of AngleSharp's HTML output, which in isolation does the right thing; you'd end up with double quotes inside the attribute which is surrounded by double quotes: style="font-family: "Roboto"..."
Why put a single-word font name in quotes, though?
Apparently, Outlook's HTML renderer requires web fonts to have quotes round them or it doesn't pick up that they're web fonts. Go figure.