Skip to content

Colon in attribute #119

@Gallaecio

Description

@Gallaecio

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions