backend/text.py (2 lines of code) (raw):

def nonewlines(s: str) -> str: return s.replace('\n', ' ').replace('\r', ' ')