def _getText(self):
    """ Body text accessor """

    try:
        text = FeedFeederItem._old_getText(self)
    except UnicodeEncodeError:
        return "Bad unicode"

    if text:
        # can be None
        request = self.REQUEST
        clean = clean_html(self, request, text)
        return clean

    return text
def _Description(self):
    """ Description accessor """
    text = FeedFeederItem._old_Description(self)

    #print "Accessing description:" + str(text)

    # Remove any HTML formatting in the description
    if text:
        try:
            parsed = lxml.html.fromstring(text.decode("utf-8"))
        except ParserError:
            # Empty document and so on
            return u""

        clean = lxml.html.tostring(parsed, encoding="utf-8", method="text").decode("utf-8")
        #print "Cleaned decsription:" + clean
        return clean

    return text
def _setDescription(self, value):
    FeedFeederItem._old_setDescription(self, value)
    flush_cache("description", self)
def _setText(self, value, *args, **kwargs):
    FeedFeederItem._old_setText(self, value, *args, **kwargs)
    flush_cache("text", self)