A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/AngleSharp/AngleSharp.Css/issues/129 below:

NullReferenceException in `ToCss()` · Issue #129 · AngleSharp/AngleSharp.Css · GitHub

var html = "<div style=\"border-width:1px;border-right-width:px;\"></div>";
var parser = new HtmlParser(new HtmlParserOptions(), BrowsingContext.New(Configuration.Default.WithCss(new CssParserOptions())));
var dom = parser.ParseDocument(html);
var div = dom.Body?.FirstElementChild;
var style = div.GetStyle();
var css = style.ToCss(); // -> exception

AngleSharp.Css version is 0.17.0.

The combination of property values has to be very specific to trigger the issue. This does not occur if only border-right-width:px is given or border-right-width:1px;border-right-width:px.

This was initially reported as mganss/HtmlSanitizer#426.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4