Module librusapi.helpers

Expand source code
def sanitize(text):
    """Remove all newlines and >1 spaces in a line of text"""
    return " ".join(text.replace("\xa0", " ").replace("&nbsp", "").split())

Functions

def sanitize(text)

Remove all newlines and >1 spaces in a line of text

Expand source code
def sanitize(text):
    """Remove all newlines and >1 spaces in a line of text"""
    return " ".join(text.replace("\xa0", " ").replace("&nbsp", "").split())