Skip to content

Conversation

achasseux
Copy link

Hello,

When CSS selector is translated into XPath, the following

e[foo!="bar"][foo!="baz"] 

becomes :

e[not(@foo) or @foo != 'bar' and (not(@foo) or @foo != 'baz')] 

It should become :

e[(not(@foo) or @foo != 'bar') and (not(@foo) or @foo != 'baz')] 

This pull request adds the left-operand parentheses.

@fabpot
Copy link
Member

fabpot commented Sep 28, 2015

@achasseux Sorry for being very late but this repository is read-only, so it's not really monitored by anyone. Could you open a pull request on symfony/symfony instead? Thanks you.

@nicolas-grekas
Copy link
Member

nicolas-grekas added a commit to symfony/symfony that referenced this pull request Feb 3, 2018
…ve parentheses, not only right operand (Arnaud CHASSEUX) This PR was merged into the 2.7 branch. Discussion ---------- [CssSelector] For AND operator, the left operand should have parentheses, not only right operand | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - From symfony/css-selector#3 Commits ------- 76b40dc [CssSelector] For AND operator, the left operand should have parentheses, not only right operand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants