Skip to content
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

CSS query improperly converted to xpath #3

Closed
weierophinney opened this issue Dec 31, 2019 · 1 comment
Closed

CSS query improperly converted to xpath #3

weierophinney opened this issue Dec 31, 2019 · 1 comment
Labels
Bug Something isn't working

Comments

@weierophinney
Copy link
Member

This issue has been moved from the zendframework repository as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html


Original Issue: https://api.github.com/repos/zendframework/zendframework/issues/7470
User: @fcheslack
Created On: 2015-04-29T21:02:26Z
Updated At: 2015-11-06T21:29:02Z
Body
In Zend\Dom\Document\Query, CSS selector strings with classes and attributes in the same segment are not properly converted to XPath.

"input.class[name='inputname']"

is converted to

input.classname[@name='inputname']

instead of

input[contains(concat(' ', normalize-space(@Class), ' '), ' classname ')][@name='inputname']

This seems to be solved by simply moving the 'Classes' section of Query._tokenize to the top of the function before the "[@" it checks for is replaced into the expression by other steps. I'm not sure if it was placed as the last step for a reason though.



Originally posted by @GeeH at zendframework/zend-dom#11

@weierophinney
Copy link
Member Author

This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Steering Committee.
If you have a security issue, please follow our security reporting guidelines.
If you wish to take on the role of maintainer, please nominate yourself

If you are looking for an actively maintained package alternative, we recommend:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants