Cannot select element using both id and class
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Beautiful Soup |
Fix Released
|
Low
|
Unassigned |
Bug Description
When trying to use Tag.select with both an id and class simultaneously, matches get missed.
Example:
```
from bs4 import BeautifulSoup
html = '<div id="sid" class="scls">Hello World!</div>'
soup = BeautifulSoup(html) # the issue is present regardless of the parser used
print(soup.
print(soup.
print(soup.
print(soup.
```
The issue, as far as I see: if there is a "#", [the code](https:/
tags: | added: css |
Changed in beautifulsoup: | |
importance: | Undecided → Low |
Thanks for reporting this bug and for going deeper to suggest a solution. The CSS selector system is contributed code and for my own sanity I only add to it when a patch and test are contributed. I'm going to leave this issue open in a 'confirmed' state and if someone provides a patch or pull request I'll merge it.