milkshakesoftware/PreMailer.Net — Issue #3: NullReferenceException when no style element
Author: nevaram
Created: 2011-11-26 09:27:58+00:00
State: open

When the htmlInput does not contains any style element, a NullReferenceException is thrown.

It's not really explicite without the sources. and perhaps the content is dynamic and it contains no element of style

In PreMailer.cs (22):

var styleNodes = doc.DocumentNode.SelectNodes("//style");

foreach (var style in styleNodes) { ... }

Thanks a lot for your works