'Return an escaped string suitable for node names and anchors.'

def escape_id(self, s):

    bad_chars = ',:.()'
    for bc in bad_chars:
        s = s.replace(bc, '    ')
    s = '    '.join(s.split()).strip()
    return self.escape(s)
