Skip to content

CssSelector does not properly unescape values before generating XPath #46682

@stof

Description

@stof

Symfony version(s) affected

all

Description

The tokenizer properly recognizes escape sequences as being part of a CSS identifier. But it keeps the escape sequence in the token value, which is then kept in the XPath.

How to reproduce

$converter = new \Symfony\Component\CssSelector\CssSelectorConverter();
dump($converter->toXPath('#foo\.bar'));

Possible Solution

To me, the unescaping should probably be done at the tokenizer level

Additional Context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy