Skip to content

Version 2.3.0

Choose a tag to compare

@jg-rp jg-rp released this 06 Jul 06:03
· 23 commits to main since this release

Fixes

  • Fixed an issue with excessively large integer values given to offset in {% for %} and {% tablerow %} tags. Previously we would get a ValueError in somme cases. Now we clamp offset to the length of the target iterable. See #209.

  • Fixed an issue with excessively large range literals ((1..10)). We now limit the minimum and maximum values allowed in range literal expressions to between -1024 and 1024.

  • Fixed an issue with FileSystemLoader where it would raise an OSError if given a very long file name when testing a path for existence.

Features

  • Added the block_nesting_limit class variable to liquid.Environment for handling excessive markup block nesting in Liquid templates. Previously we would get a RecursionError at render time if Python's recursion limit was reached. Now we raise a BlockNestingError (a subclass of ResourceLimitError) at parse time if block_nesting_limit is reached.

    The default block_nesting_limit is 30. That's a maximum depth of 30 blocks per template source string or file.

    See #208.