

def handle_charref(self, char):
    if (char[:1] == 'x'):
        char = int(char[1:], 16)
    else:
        char = int(char)
    if (0 <= char < 128):
        self.__builder.data(chr(char))
    else:
        self.__builder.data(unichr(char))

dataset/ETHPy150Open CollabQ/CollabQ/vendor/elementtree/HTMLTreeBuilder.py HTMLTreeBuilder.handle_charref/original