-
Notifications
You must be signed in to change notification settings - Fork 23
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
Invalid selector is causing unrecoverable error #19
Comments
I will look at it after my vacation :) |
Thanks! Have a great vacation : ) |
The problem is the invalid selector. As you may know, there can be many selectors (e.g. |
@phax, according to Specs, the entire rule should be dropped. See https://www.w3.org/TR/css3-selectors/#Conformance:
and https://www.w3.org/TR/CSS2/syndata.html#rule-sets:
|
I've also created a simple test and all browsers seem to comply with the specs: https://jsfiddle.net/aqdtzcac/1/ (tried Chrome, FF, IE 9/10/11, Safari on iOS and some androids as well). |
Thanks for the clarification. I'm working on a solution that works for you when you enable "browser compliant mode". |
Thanks Philip, good to know =) |
For invalid selectors only. As the parser is grammar based I need to differentiate between recoverable and unrecoverable errors. Creating a completely lax parser is currently out of scope :) |
@phax just so I know, do you have an estimate for the fix? |
within this week - but after 6 weeks of vacation there is plenty to do :) |
I have it locally working but been struggeling with some tests.... |
Locally things are working. Please check with the latest SNAPSHOT |
Hi Philip, it is working just fine! The only question is - if it is going to be released in 5.0 stream, it will be incompatible with Java 1.7, right? Any chance to include this into 4.0 stream? We can't drop support for Java 7 unfortunately now... |
If necessary, we can contribute - under your guidance. We highly value your project and depend on it heavily, so we would be glad to do that. |
Well I already created a 4.1 backport and I think I can do the same for this fix. |
Release 4.1.1 is on its way to Maven central |
phax/ph-css#17 phax/ph-css#18 phax/ph-css#19 git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1740187 13f79535-47bb-0310-9956-ffa450edef68
@phax , it's not a big thing, but just to let you know I added a mention of you and your project in our changes.html#thanks section Apache JMeter 3.0 will be using your library. |
Thanks for the info and good luck for JMeter!! It's a great tool I'm also using! |
Hi again Philip, it's been a while!
I am having the following situation and I wonder if you could give any advice here. It's possible that it's not your parser's responsibility but perhaps you could point to a way to work around this with your APIs.
So, one of the goals of our application when it comes to CSS parsing is to transform all the url()-s in it. We do so by using the
CSSVisitor.visitCSSUrl()
method.However, when we have CSS like this:
the parser fails unrecoverably on the
.#f
selector and so we're unable to transform the URLs. We're using v4.0.0 with CSS3 parser and.setBrowserCompliantMode(true)
- which, as I imagined, shouldn't have treated such error as unrecoverable - as browser doesn't.Sorry if my questions are noob - I am by no means a Java programmer. Thanks
The text was updated successfully, but these errors were encountered: