select() incorrectly splits some selectors
Bug #1724378 reported by
Kerry Kurian
This bug report is a duplicate of:
Bug #1692137: Using selector with multiword attribute value throws exception.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Beautiful Soup |
New
|
Undecided
|
Unassigned |
Bug Description
element.py:
1345 def select(self, selector, _candidate_
1346 """Perform a CSS selection operation on the current element."""
1347
1348 # Handle grouping selectors if ',' exists, ie: p,a
1349 if ',' in selector:
1350 context = []
1351 for partial_selector in selector.
The selector is split on comma irrespective of whether the comma is in quotes. This is problematic when the selector is something like the following:
a[title=
In this example the selector is erroneously split into:
'a[
and:
' we have problem"]'
To post a comment you must log in.