We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AngleSharp.Xml
The syntax for background specifying both position and size separated by a slash is unsupported. #124 seems to be related.
background
This was initiallly reported as mganss/HtmlSanitizer#536
var html = @"<div style=""background: center / cover;""></div>"; var conf = Configuration.Default.WithCss(new CssParserOptions { IsIncludingUnknownDeclarations = true, IsIncludingUnknownRules = true, IsToleratingInvalidSelectors = true, }); var parser = new HtmlParser(new HtmlParserOptions { IsScripting = true }, BrowsingContext.New(conf)); var dom = parser.ParseDocument(html); var elem = dom.QuerySelector("div"); var style = elem.GetStyle(); var styleCount = style.Count(); // -> 0
The number of styles is nonzero.
The number of styles is zero.
No response
The text was updated successfully, but these errors were encountered:
Getting same problem here, I believe it's because the / is not been skipped by calling SkipSpacesAndComments:
/
SkipSpacesAndComments
AngleSharp.Css/src/AngleSharp.Css/Declarations/BackgroundDeclaration.cs
Line 130 in 459b48c
Debugger page:
Sorry, something went wrong.
No branches or pull requests
Prerequisites
AngleSharp.Xml
for Xml support)Description
The syntax for
background
specifying both position and size separated by a slash is unsupported. #124 seems to be related.This was initiallly reported as mganss/HtmlSanitizer#536
Steps to Reproduce
Expected Behavior
The number of styles is nonzero.
Actual Behavior
The number of styles is zero.
Possible Solution / Known Workarounds
No response
The text was updated successfully, but these errors were encountered: