Version 0.4.3 http://svn.edgewall.org/repos/genshi/tags/0.4.3/ (?, from branches/stable/0.4.x) * The I18n filter no longer extracts or translates literal strings in attribute values that also contain expressions. * Added `loader_callback` option to plugin interface, which allows specifying a callback function that the template loader should invoke whenever a new template is loaded (ticket #130). Note that the value for this option can not be specified as a string, only as an actual function object, which means it is not available for use through configuration files. * The I18n filter now extracts messages from gettext functions even inside ignored tags (ticket #132). * The HTML sanitizer now strips any CSS comments in style attributes, which could previously be used to hide malicious property values. * The HTML sanitizer now also removes any HTML comments encountered, as those may be used to hide malicious payloads targetting a certain "innovative" browser that goes and interprets the content of specially prepared comments. * Attribute access in template expressions no longer silently ignores exceptions other than `AttributeError` raised in the attribute accessor. Version 0.4.2 http://svn.edgewall.org/repos/genshi/tags/0.4.2/ (Jun 20, from branches/stable/0.4.x) * The `doctype` parameter of the markup serializers now also accepts the "name" of the doctype as string, in addition to the `(name, pubid, sysid)` tuple. * The I18n filter was not replacing the original attributes with the translation, but instead adding a second attribute with the same name. * `TextTemplate` can now handle unicode source (ticket #125). * A `` processing instruction containing trailing whitespace no longer causes a syntax error (ticket #127). * The I18n filter now skips the content of elements that have an `xml:lang` attribute with a fixed string value. Basically, `xml:lang` can now be used as a flag to mark specific sections as not needing localization. * Added plugin for message extraction via Babel (http://babel.edgewall.org/). Version 0.4.1 http://svn.edgewall.org/repos/genshi/tags/0.4.1/ (May 21 2007, from branches/stable/0.4.x) * Fix incorrect reference to translation function in the I18N filter. * The `ET()` function now correctly handles attributes with a namespace. * XML declarations are now processed internally, as well as written to the output when XML serialization is used (ticket #111). * Added the functions `encode()` and `get_serializer()` to the `genshi.output` module, which provide a lower-level API to the functionality previously only available through `Stream.render()` and `Stream.serialize()`. * The `DocType` class now has a `get(name)` function that returns a `DOCTYPE` tuple for a given string. * Added frameset variants to the `DocType` constants for HTML 4.01 and XHTML 1.0. * Improved I18n extraction for pluralizable messages: for any translation function with multiple string arguments (such as ``ngettext``), a single item with a tuple of strings is yielded, instead an item for each string argument. * The `HTMLFormFiller` stream filter no longer alters form elements for which the data element contains no corresponding item. * Code in `` processing instructions no longer gets the special treatment as Python code in template expressions, i.e. item and attribute access are no longer interchangeable (which was broken in a number of ways anyway, see ticket #113). This change does not affect expressions. * Numerous fixes for the execution of Python code in `` processing instructions (tickets #113 and #114). * The `py:def` (and `#def`) directive now supports "star args" (i.e. `*args` and `**kwargs`) in the function declaration (ticket #116). Version 0.4 http://svn.edgewall.org/repos/genshi/tags/0.4.0/ (Apr 16 2007, from branches/stable/0.4.x) * New example applications for CherryPy and web.py. * The template loader now uses a LRU cache to limit the number of cached templates to a configurable maximum. Also, a race condition in the template loader was fixed by adding locking. * A new filter (genshi.filters.HTMLFormFiller) was added, which can populate HTML forms based on a dictionary of values. * The set of permitted tag and attribute names for the HTMLSanitizer can now be configured per instance. * The template engine plugin now supports a range of options for configuration, for example to set the default serialization method, the default output encoding, or the default DOCTYPE. * The ElementTree adaptation function `ET()` has moved into the `genshi.input` module. * Allow `when` directives to omit the test expression as long as the associated choose directive does have one. In that case, the when branch is followed if the expression of the choose directive evaluates to a truth value. * Unsuccessful attribute or item lookups now return `Undefined` objects for nicer error messages. * Split up the `genshi.template` module into multiple modules inside the new `genshi.template` package. * Results of expression evaluation are no longer implicitly called if they are callable. * Instances of the `genshi.core.Attrs` class are now immutable (they are subclasses of `tuple` instead of `list`). * `MarkupTemplate`s can now be instantiated from markup streams, in addition to strings and file-like objects (ticket #69). * Improve handling of incorrectly nested tags in the HTML parser. * Template includes can now be nested inside fallback content. * Expressions can now contain dict literals (ticket #37). * It is now possible to have one or more escaped dollar signs in front of a full expression (ticket #92). * The `Markup` class is now available by default in template expressions (ticket #67). * The handling of namespace declarations in XML/XHTML output has been improved. * The `Attrs` class no longer automatically wraps all attribute names in `QName` objects. This is now the responsibility of whoever is instantiating `Attrs` objects (for example, stream filters and generators). * Python code blocks are now supported using the `` processing instruction (ticket #84). * The way errors in template expressions are handled can now be configured. The option `LenientLookup` provides the same forgiving mode used in previous Genshi versions, while `StrictLookup` raises exceptions when undefined variables or members are accessed. The lenient mode is still the default in this version, but that may change in the future. (ticket #88) * If a variable is not necessarily defined at the top level of the template data, the new built-in functions `defined(key)` and `value_of(key, default)` can be used so that the template also works in strict lookup mode. These functions were previously only available when using Genshi via the template engine plugin (for compatibility with Kid). * `style` attributes are no longer allowed by the `HTMLSanitizer` by default. If they are explicitly added to the set of safe attributes, any unicode escapes in the attribute value are now handled properly. * Namespace declarations on conditional elements (for example using a `py:if` directive`) are no longer moved to the following element when the element originally carrying the declaration is removed from the stream (ticket #107). * Added basic built-in support for internationalizing templates by providing a new `Translator` class that can both extract localizable strings from a stream, and replace those strings with their localizations at render time. The code for this was largely taken from previous work done by Matt Good and David Fraser. Version 0.3.6 http://svn.edgewall.org/repos/genshi/tags/0.3.6/ (Dec 11 2006, from branches/stable/0.3.x) * The builder API now accepts streams as children of elements and fragments. Version 0.3.5 http://svn.edgewall.org/repos/genshi/tags/0.3.5/ (Nov 22 2006, from branches/stable/0.3.x) * Fix XPath traversal in match templates. Previously, `div/p` would be treated the same as `div//p`, i.e. it would match all descendants and not just the immediate children. * Preserve whitespace in HTML `
` elements also when they contain child elements. * Match templates no longer match their own output (ticket #77). * Blank lines before directives in text templates are now preserved as expected (ticket #62). Version 0.3.4 http://svn.edgewall.org/repos/genshi/tags/0.3.4/ (Nov 2 2006, from branches/stable/0.3.x) * The encoding of HTML and XML files, as well as markup and text templates, can now be specified. Also, the encoding specified in XML declarations is now respected unless an expiclit encoding is requested. * Expressions used as arguments for `py:with`, `py:def`, and `py:for` directives can now contain non-ASCII strings. Version 0.3.3 http://svn.edgewall.org/repos/genshi/tags/0.3.3/ (Oct 16 2006, from branches/stable/0.3.x) * Fixed bug introduced in 0.3.2 that broke the parsing of templates which declare the same namespace more than once in a nested fashion. * Fixed the parsing of HTML entity references inside attribute values, both in the `XMLParser` and the `HTMLParser` classes. * Some changes to usage of absolute vs. relative template paths to ensure that the filenamed-keyed cache employed by the TemplateLoader doesn't mix up templates with the same name, but from different subdirectories. Version 0.3.2 http://svn.edgewall.org/repos/genshi/tags/0.3.2/ (Oct 12 2006, from branches/stable/0.3.x) * Exceptions from templates now contain the absolute path to the template file when a search path is used. This enables tracebacks to display the line in question. * The template engine plugin now provides three different types: "genshi" and "genshi-markup" map to markup templates, while "genshi-text" maps to text templates. * Fixed the namespace context used by XPath patterns in py:match templates. The were erroneously using the namespace context of the elements being matched, where they should rather use the context in which they were defined. * The contents of `