Soupsieve

Latest version: v2.6

Safety actively analyzes 714860 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 8

1.9.1

- **FIX**: `:root`, `:contains()`, `:default`, `:indeterminate`, `:lang()`, and `:dir()` will properly account for HTML `iframe` elements in their logic when selecting or matching an element. Their logic will be restricted to the document for which the element under consideration applies.
- **FIX**: HTML pseudo-classes will check that all key elements checked are in the XHTML namespace (HTML parsers that do not provide namespaces will assume the XHTML namespace).
- **FIX**: Ensure that all pseudo-class names are case insensitive and allow CSS escapes.

1.9.0

- **NEW**: Allow `:contains()` to accept a list of text to search for. (115)
- **NEW**: Add new `escape` function for escaping CSS identifiers. (125)
- **NEW**: Deprecate `comments` and `icomments` functions in the API to ensure Soup Sieve focuses only in CSS selectors. `comments` and `icomments` will most likely be removed in 2.0. (130)
- **NEW**: Add Python 3.8 support. (133)
- **FIX**: Don't install test files when installing the `soupsieve` package. (111)
- **FIX**: Improve efficiency of `:contains()` comparison.
- **FIX**: Null characters should translate to the Unicode REPLACEMENT CHARACTER (`U+FFFD`) according to the specification. This applies to CSS escaped NULL characters as well. (124)
- **FIX**: Escaped EOF should translate to `U+FFFD` outside of CSS strings. In a string, they should just be ignored, but as there is no case where we could resolve such a string and still have a valid selector, string handling remains the same. (128)

1.8.0

- **NEW**: Add custom selector support. (92)(108)
- **FIX**: Small tweak to CSS identifier pattern to ensure it matches the CSS specification exactly. Specifically, you can't have an identifier of only `-`. (107)
- **FIX**: CSS string patterns should allow escaping newlines to span strings across multiple lines. (107)
- **FIX**: Newline regular expression for CSS newlines should treat `\r\n` as a single character, especially in cases such as string escapes: `\\\r\n`. (107)
- **FIX**: Allow `--` as a valid identifier or identifier start. (107)
- **FIX**: Bad CSS syntax now raises a `SelectorSyntaxError`, which is still currently derived from `SyntaxError`, but will most likely be derived from `Exception` in the future.

1.7.3

- **FIX**: Fix regression with tag names in regards to case sensitivity, and ensure there are tests to prevent breakage
in the future.
- **FIX**: XHTML should always be case sensitive like XML.

1.7.2

- **FIX**: Fix HTML detection for `type` selector.
- **FIX**: Fixes for `:enabled` and `:disabled`.
- **FIX**: Provide a way for Beautiful Soup to parse selectors in a quirks mode to mimic some of the quirks of the old select method prior to Soup Sieve, but with warnings. This is to help old scripts to not break during the transitional period with newest Beautiful Soup. In the future, these quirks will raise an exception as Soup Sieve requires selectors to follow the CSS specification.

1.7.1

- **FIX**: Fix issue with `:has()` selector where a leading combinator can only be provided in the first selector in a relative selector list.

Page 4 of 8

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.