code: def _htmlify_text(self, s):
      
      colored = self._handle_ansi_color_codes(html.escape(s))
      return linkify(self._buildroot, colored, self._linkify_memo).replace('\n', '</br>')
docs: Make text HTML-friendly.