You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
soup: a quoted comma in an attribute value silently empties a selector list #191
A comma inside a quoted attribute value makes the selector-list splitter cut the list in the wrong place. The result is an empty list with no exception — and it discards the matches of groups in the same list that parse fine.
Found while re-checking #182 at 291042d. It is pre-existing (the same behaviour is on the base commit), so it is not a regression from that PR, and it only ever under-matches — it cannot widen a match, which is why it is filed separately rather than raised as a blocker there.
soupsieve 2.10 (the bench-soup pin) returns ['t2', 't3'] in both list cases.
[title="a,b"] on its own is parsed correctly, so the attribute parser is not at fault — the group separator is split without regard for quotes.
Why it matters
#182's contract is that attribute syntax the parser cannot read raises instead of dropping the constraint silently. This is the one form that still drops silently, and it is worse than dropping a constraint: a selector list whose other groups are perfectly parseable returns nothing at all. A caller gets an empty result with no signal.
Either make the group splitter quote-aware, or reject an unparseable group the way #182 rejects unparseable attribute syntax. The first is more useful, since [title="a,b"] is valid CSS and already parses correctly in isolation.
Activity
fix(soup): make the selector-list splitter quote-aware