Chameleon

Latest version: v4.5.4

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

Scan your dependencies

Page 14 of 19

2.4.2

------------------

Bugfixes:

- Fixed an issue in the compiler where an internal variable (such as a
translation default value) would be cached, resulting in variable
scope corruption (see issue 49).

2.4.1

------------------

Bugfixes:

- Fixed an issue where a default value for an attribute would
sometimes spill over into another attribute.

- Fixed issue where the use of the ``default`` name in an attribute
interpolation expression would print the attribute value. This is
unexpected, because it's an expression, not a static text suitable
for output. An attribute value of ``default`` now correctly drops
the attribute.

2.4.0

------------------

Features:

- Added an option ``boolean_attributes`` to evaluate and render a
provided set of attributes using a boolean logic: if the attribute
is a true value, the value will be the attribute name, otherwise the
attribute is dropped.

In the reference implementation, the following attributes are
configured as boolean values when the template is rendered in
HTML-mode::

"compact", "nowrap", "ismap", "declare", "noshade",
"checked", "disabled", "readonly", "multiple", "selected",
"noresize", "defer"

Note that in Chameleon, these attributes must be manually provided.

Bugfixes:

- The carriage return character (used on Windows platforms) would
incorrectly be included in Python comments.

It is now replaced with a line break.

This fixes issue 44.

2.3.8

------------------

- Fixed import error that affected Python 2.5 only.

2.3.7

------------------

Features:

- Added an option ``literal_false`` that disables the default behavior
of dropping an attribute for a value of ``False`` (in addition to
``None``). This modified behavior is the behavior exhibited in
reference implementation.

Bugfixes:

- Undo attribute special HTML attribute behavior (see previous
release).

This turned out not to be a compatible behavior; rather, boolean
values should simply be coerced to a string.

Meanwhile, the reference implementation does support an HTML mode in
which the special attribute behavior is exhibited.

We do not currently support this mode.

2.3.6

------------------

Features:

- Certain HTML attribute names now have a special behavior for a
attribute value of ``True`` (or ``default`` if no default is
defined). For these attributes, this return value will result in the
name being printed as the value::

<input type="input" tal:attributes="checked True" />

will be rendered as::

<input type="input" checked="checked" />

This behavior is compatible with the reference implementation.

Page 14 of 19

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.