Mercurial > genshi > mirror
comparison markup/output.py @ 201:c5e0a1c86173 trunk
The `TextSerializer` should produce `unicode` objects, not `Markup` objects.
author | cmlenz |
---|---|
date | Fri, 25 Aug 2006 12:39:55 +0000 |
parents | 5861f4446c26 |
children | 0141f45c18e1 |
comparison
equal
deleted
inserted
replaced
200:5861f4446c26 | 201:c5e0a1c86173 |
---|---|
425 def __call__(self, stream): | 425 def __call__(self, stream): |
426 for kind, data, pos in stream: | 426 for kind, data, pos in stream: |
427 if kind is TEXT: | 427 if kind is TEXT: |
428 if type(data) is Markup: | 428 if type(data) is Markup: |
429 data = data.striptags().stripentities() | 429 data = data.striptags().stripentities() |
430 yield data | 430 yield unicode(data) |
431 | 431 |
432 | 432 |
433 class WhitespaceFilter(object): | 433 class WhitespaceFilter(object): |
434 """A filter that removes extraneous ignorable white space from the | 434 """A filter that removes extraneous ignorable white space from the |
435 stream.""" | 435 stream.""" |