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

JSoup cannot parse IDs with underscores #10

Closed
svivian opened this issue Feb 21, 2010 · 2 comments
Closed

JSoup cannot parse IDs with underscores #10

svivian opened this issue Feb 21, 2010 · 2 comments
Labels
bug Confirmed bug that we should fix

Comments

@svivian
Copy link

svivian commented Feb 21, 2010

Example:
Elements id = doc.select( "#An_ID_name" );

Error output:
Could not parse query #An_ID_name

Underscores are valid characters for IDs, but JSoup seems to choke on them. Regular IDs are working fine. There are other valid characters that I haven't tested, like dashes - these should all be accepted.

@jhy
Copy link
Owner

jhy commented Feb 21, 2010

Allow - and _ in CSS ID selectors.

Closed by 22bf5ab.

michael-simons pushed a commit to michael-simons/jsoup that referenced this issue Jul 12, 2011
zazi pushed a commit to dswarm/jsoup that referenced this issue Oct 15, 2015
@gp2you
Copy link

gp2you commented Dec 29, 2015

doesnt work for class name which start with underscore

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug that we should fix
Projects
None yet
Development

No branches or pull requests

3 participants