(self, ref)
Handle character references as data.
Handle character references as data.
Handle character references as data .
def handle_charref(self, ref):
        "Handle character references as data."
        if self.convertEntities in [self.HTML_ENTITIES,
                                    self.XML_ENTITIES]:
            data = unichr(int(ref))
        else:
            data = '&#%s;' % ref
        self.handle_data(data)
def handle_charref ( self , ref ) : if self . convertEntities in [ self . HTML_ENTITIES , self . XML_ENTITIES ] : data = unichr ( int ( ref ) ) else : data = '&#%s;' % ref self . handle_data ( data )