code: def nl2br(self, text):
          
          if isinstance(text, bytes):
              return text.replace(b'\n', b'<br/>\n')
          else:
              return text.replace('\n', '<br/>\n')
docs: Replace \'\n\' with \'<br/>\\n\'