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

translation inconsistency: no quote in attribute selector #13

Open
justnpT opened this issue Mar 5, 2021 · 1 comment
Open

translation inconsistency: no quote in attribute selector #13

justnpT opened this issue Mar 5, 2021 · 1 comment

Comments

@justnpT
Copy link

justnpT commented Mar 5, 2021

a = "//a[contains(@href,'attestation-upload')]"
cssify(a)

output:

a[href*=attestation-upload]

expected condition:

in this case proper css selector, or the more accurate selector would be one with quoted value:

a[href*='attestation-upload']

I believe there should be an elegant way to make it happen

@DallanQ
Copy link

DallanQ commented Apr 12, 2024

Related problem: //a[@href='/browse/boardgame'] is translated to a[href=/browse/boardgame] (without quotes) which BeautifulSoup says is an invalid selector. Adding quotes a[href='/browse/boardgame'] makes BeautifulSoup happy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants