-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
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
Error parsing bootstrap css #77
Comments
Can you debug and find out the string passed to AngleSharp´s As a workaround now, use the |
The string passed was @Keyframes progress-bar-stripes, i found that the error is when the selector starts with @, i added the next validation to the method FindElementsWithStyles. foreach (var style in stylesToApply)
Now it is working. |
@martinnormark You said in #78 that you're waiting on this issue to be sorted before a NuGet release with the new AngelSharp. Is there any idea when this will be? I'm actually getting the same issue as #9 and I'm hoping the AngelSharp switch will fix this. |
Have you tried verifying using current master branch, and writing a test case for it? Haven't looked further into a general way of solving this issue yet. |
I have downloaded bootstrap from here https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css to my C drive and have added the next test case to PreMailerTests.cs to reproduce the error.
|
This issue. There's a comment with markup to test #9 in that issue: #9 (comment) |
As a catch all, I've wrapped querying DOM elements by CSS selector in a try-catch block, adding to the warnings array of the result the failed selectors. For this particular issue, note that even the minified Bootstrap CSS is a 118 KB footprint in every email you sent. Currently PreMailer does not parse a |
I am getting an error when tring to parse bootstrap css framework.
The string did not match the expected pattern.
at AngleSharp.Extensions.QueryExtensions.QuerySelectorAll(INodeList elements, String selectors)
at AngleSharp.Dom.Document.QuerySelectorAll(String selectors)
at PreMailer.Net.PreMailer.FindElementsWithStyles(SortedList`2 stylesToApply) in PreMailer.cs:line 305
at PreMailer.Net.PreMailer.MoveCssInline(Boolean removeStyleElements, String ignoreElements, String css, Boolean stripIdAndClassAttributes, Boolean removeComments) in PreMailer.cs:line 104
at PreMailer.Net.PreMailer.MoveCssInline(String html, Boolean removeStyleElements, String ignoreElements, String css, Boolean stripIdAndClassAttributes, Boolean removeComments) in PreMailer.cs:line 51
Do you have any idea?
The text was updated successfully, but these errors were encountered: