Changes between Version 7 and Version 8 of MarkupStream
- Timestamp:
- Aug 29, 2006, 12:22:06 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MarkupStream
v7 v8 78 78 One example of a filter included with Markup is the `HTMLSanitizer` in `markup.filters`. It processes a stream of HTML markup, and strips out any potentially dangerous constructs, such as Javascript event handlers. `HTMLSanitizer` is not a function, but rather a class that implements `__call__`, which means instances of the class are callable. 79 79 80 Both the `filter()` method and the right-shift operator allow easy chaining of filters: 81 80 Both the `filter()` method and the pipe operator allow easy chaining of filters: 82 81 {{{ 83 82 #!python … … 87 86 88 87 That is equivalent to: 89 90 88 {{{ 91 89 #!python