from bs4 import BeautifulSoup


def standardize_html(html):
    """Clean and format html for consistency."""
    cleaned = html.replace(".  ", ". ").replace("  ", "").replace("\n", "")
    parsed = BeautifulSoup(cleaned, "lxml").prettify().strip()
    return parsed