<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _htmlify_text(self, s):
 """Make text HTML-friendly."""

    colored = self._handle_ansi_color_codes(html.escape(s))
    return linkify(self._buildroot, colored, self._linkify_memo).replace('\n', '</br>')