code: def strip_caret_codes(text):
      
      ## temporarily escape out ^^
      text = text.replace('^^', '\x00')
      for token, foo in _ANSI_CODES:
          text = text.replace(token, '')
      return text.replace('\x00', '^')
docs: Strip out any caret codes from a string.