ph-css: Invalid selector is causing unrecoverable error
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:
body {
background: url(../bg.png);
}
.#f { color: red; }
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
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (10 by maintainers)
Commits related to this issue
- Invalid selectors are handled in browser compliant mode; #17 #19 — committed to phax/ph-css by phax 8 years ago
- Upgrade ph-css to 4.1.1 as it contains fixes we reported: https://github.com/phax/ph-css/issues/17 https://github.com/phax/ph-css/issues/18 https://github.com/phax/ph-css/issues/19 git-svn-id: https:... — committed to apache/jmeter by pmouawad 8 years ago
Locally things are working. Please check with the latest SNAPSHOT