def __call__(self, stream):
    strip_markup = self.strip_markup
    for event in stream:
        if (event[0] is TEXT):
            data = event[1]
            if (strip_markup and (type(data) is Markup)):
                data = data.striptags().stripentities()
            (yield unicode(data))
def __call__(self, stream):
    strip_markup = self.strip_markup
    for event in stream:
        if (event[0] is TEXT):
            data = event[1]
            if (strip_markup and (type(data) is Markup)):
                data = data.striptags().stripentities()
            (yield unicode(data))