'Replace all characters not allowed in text an attribute values.'

def esc(self, name):

    name = name.replace('&', '&amp;')
    name = name.replace('<', '&lt;')
    name = name.replace('>', '&gt;')
    name = name.replace('"', '&quot;')
    name = name.replace("'", '&#39;')
    return name
