Quantcast
Channel: HTML Renderer
Viewing all articles
Browse latest Browse all 693

New Post: issue

$
0
0
Hello,

I'm testing your brilliant control on huge DB with more 110 000 records.

I've found bug. If HTML data contains structure like:
<STYLE><em>
Then it will bomb with NullReferenceException.

To fix that you should add null check to CascadeStyles method of HtmlRenderer.Parse.DomParser class.

Replace string
if (box.HtmlTag.Name.Equals("style", StringComparison.CurrentCultureIgnoreCase) && box.Boxes.Count == 1)
to:
if (box.HtmlTag.Name.Equals("style", StringComparison.CurrentCultureIgnoreCase) && box.Boxes.Count == 1 && box.Boxes[0].Text != null)
Thanks.

Viewing all articles
Browse latest Browse all 693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>