Mercurial > genshi > mirror
comparison ChangeLog @ 720:acf7c5ee36e7 experimental-newctxt
newctxt branch: Merged revisions [678:835] via svnmerge from [source:trunk].
author | cmlenz |
---|---|
date | Fri, 11 Apr 2008 08:42:11 +0000 |
parents | 837786a584d5 |
children |
comparison
equal
deleted
inserted
replaced
567:837786a584d5 | 720:acf7c5ee36e7 |
---|---|
15 (ticket #123). | 15 (ticket #123). |
16 * Includes are now processed when the template is parsed if possible, but | 16 * Includes are now processed when the template is parsed if possible, but |
17 only if the template loader is not set to do automatic reloading. Included | 17 only if the template loader is not set to do automatic reloading. Included |
18 templates are basically inlined into the including template, which can | 18 templates are basically inlined into the including template, which can |
19 speed up rendering of that template a bit. | 19 speed up rendering of that template a bit. |
20 * Added new syntax for text templates, which is more powerful and flexible | |
21 with respect to white-space and line breaks. It also supports Python code | |
22 blocks. The old syntax is still available and the default for now, but in a | |
23 future release the new syntax will become the default, and some time after | |
24 that the old syntax will be removed. | |
25 * Added support for passing optimization hints to `<py:match>` directives, | |
26 which can speed up match templates in many cases, for example when a match | |
27 template should only be applied once to a stream, or when it should not be | |
28 applied recursively. | |
29 * Text templates now default to rendering as plain text; it is no longer | |
30 necessary to explicitly specify the "text" method to the `render()` or | |
31 `serialize()` method of the generated markup stream. | |
32 * XInclude elements in markup templates now support the `parse` attribute; | |
33 when set to "xml" (the default), the include is processed as before, but | |
34 when set to "text", the included template is parsed as a text template using | |
35 the new syntax (ticket #101). | |
36 * Python code blocks inside match templates are now executed (ticket #155). | |
37 * The template engine plugin no longer adds the `default_doctype` when the | |
38 `fragment` parameter is `True`. | |
39 * The `striptags` function now also removes HTML/XML-style comments (ticket | |
40 #150). | |
41 * The `py:replace` directive can now also be used as an element, with an | |
42 attribute named `value` (ticket #144). | |
43 * The `TextSerializer` class no longer strips all markup in text by default, | |
44 so that it is still possible to use the Genshi `escape` function even with | |
45 text templates. The old behavior is available via the `strip_markup` option | |
46 of the serializer (ticket #146). | |
47 * Assigning to a variable named `data` in a Python code block no longer | |
48 breaks context lookup. | |
49 * The `Stream.render` now accepts an optional `out` parameter that can be | |
50 used to pass in a writable file-like object to use for assembling the | |
51 output, instead of building a big string and returning it. | |
52 * The XHTML serializer now strips `xml:space` attributes as they are only | |
53 allowed on very few tags. | |
54 * Match templates are now applied in a more controlled fashion: in the order | |
55 they are declared in the template source, all match templates up to (and | |
56 including) the matching template itself are applied to the matched content, | |
57 whereas the match templates declared after the matching template are only | |
58 applied to the generated content (ticket #186). | |
59 * The `TemplateLoader` class now provides an `_instantiate()` method that can | |
60 be overridden by subclasses to implement advanced template instantiation | |
61 logic (ticket #204). | |
62 * The search path of the `TemplateLoader` class can now contain ''load | |
63 functions'' in addition to path strings. A load function is passed the | |
64 name of the requested template file, and should return a file-like object | |
65 and some metadata. New load functions are supplied for loading from egg | |
66 package data, and loading from different loaders depending on the path | |
67 prefix of the requested filename (ticket #182). | |
68 * Match templates can now be processed without keeping the complete matched | |
69 content in memory, which could cause excessive memory use on long pages. | |
70 The buffering can be disabled using the new `buffer` optimization hint on | |
71 the `<py:match>` directive. | |
72 * Improve error reporting when accessing an attribute in a Python expression | |
73 raises an `AttributeError` (ticket #191). | |
74 * The `Markup` class now supports mappings for right hand of the `%` (modulo) | |
75 operator in the same way the Python string classes do, except that the | |
76 substituted values are escape. Also, the special constructor which took | |
77 positional arguments that would be substituted was removed. Thus the | |
78 `Markup` class now supports the same arguments as that of its `unicode` | |
79 base class (ticket #211). | |
80 * The `Template` class and its subclasses, as well as the interpolation API, | |
81 now take an `filepath` parameter instead of `basedir` (ticket #207). | |
82 | |
83 | |
84 Version 0.4.4 | |
85 http://svn.edgewall.org/repos/genshi/tags/0.4.4/ | |
86 (Aug 14, 2007, from branches/stable/0.4.x) | |
87 | |
88 * Fixed augmented assignment to local variables in Python code blocks. | |
89 * Fixed handling of nested function and class definitions in Python code | |
90 blocks. | |
91 * Includes were not raising `TemplateNotFound` exceptions even when no | |
92 fallback has been specified. That has been corrected. | |
93 * The template loader now raises a `TemplateNotFound` error when a previously | |
94 cached template is removed or renamed, where it previously was passing up | |
95 an `OSError`. | |
96 * The Genshi I18n filter can be configured to only extract messages found in | |
97 `gettext` function calls, ignoring any text nodes and attribute values | |
98 (ticket #138). | |
20 | 99 |
21 | 100 |
22 Version 0.4.3 | 101 Version 0.4.3 |
23 http://svn.edgewall.org/repos/genshi/tags/0.4.3/ | 102 http://svn.edgewall.org/repos/genshi/tags/0.4.3/ |
24 (?, from branches/stable/0.4.x) | 103 (Jul 17 2007, from branches/stable/0.4.x) |
25 | 104 |
26 * The I18n filter no longer extracts or translates literal strings in | 105 * The I18n filter no longer extracts or translates literal strings in |
27 attribute values that also contain expressions. | 106 attribute values that also contain expressions. |
28 * Added `loader_callback` option to plugin interface, which allows specifying | 107 * Added `loader_callback` option to plugin interface, which allows specifying |
29 a callback function that the template loader should invoke whenever a new | 108 a callback function that the template loader should invoke whenever a new |
32 it is not available for use through configuration files. | 111 it is not available for use through configuration files. |
33 * The I18n filter now extracts messages from gettext functions even inside | 112 * The I18n filter now extracts messages from gettext functions even inside |
34 ignored tags (ticket #132). | 113 ignored tags (ticket #132). |
35 * The HTML sanitizer now strips any CSS comments in style attributes, which | 114 * The HTML sanitizer now strips any CSS comments in style attributes, which |
36 could previously be used to hide malicious property values. | 115 could previously be used to hide malicious property values. |
116 * The HTML sanitizer now also removes any HTML comments encountered, as those | |
117 may be used to hide malicious payloads targetting a certain "innovative" | |
118 browser that goes and interprets the content of specially prepared comments. | |
119 * Attribute access in template expressions no longer silently ignores | |
120 exceptions other than `AttributeError` raised in the attribute accessor. | |
37 | 121 |
38 | 122 |
39 Version 0.4.2 | 123 Version 0.4.2 |
40 http://svn.edgewall.org/repos/genshi/tags/0.4.2/ | 124 http://svn.edgewall.org/repos/genshi/tags/0.4.2/ |
41 (Jun 20, from branches/stable/0.4.x) | 125 (Jun 20 2007, from branches/stable/0.4.x) |
42 | 126 |
43 * The `doctype` parameter of the markup serializers now also accepts the "name" | 127 * The `doctype` parameter of the markup serializers now also accepts the "name" |
44 of the doctype as string, in addition to the `(name, pubid, sysid)` tuple. | 128 of the doctype as string, in addition to the `(name, pubid, sysid)` tuple. |
45 * The I18n filter was not replacing the original attributes with the | 129 * The I18n filter was not replacing the original attributes with the |
46 translation, but instead adding a second attribute with the same name. | 130 translation, but instead adding a second attribute with the same name. |