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

Colon in attribute #119

Open
Gallaecio opened this issue Jun 23, 2021 · 0 comments
Open

Colon in attribute #119

Gallaecio opened this issue Jun 23, 2021 · 0 comments
Labels

Comments

@Gallaecio
Copy link
Member

In CSS, it turns out you can specify a colon in an attribute name by escaping it.

This is not valid:

::attr(:foo)

But this is:

::attr(\:foo)

And cssselect fails on the former and supports the later, as it should, only that it fails to translate it into a valid XPath expression. It turns it into:

descendant-or-self::*/@:foo

I’m not sure what the best XPath translation would be (this?), but the current one seem to be invalid XPath.

@Gallaecio Gallaecio added the bug label Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant