import re


def fix_spaces(s):
    """Remove extra spaces and convert non-breaking spaces to normal ones."""

    s = s.replace("\xa0", " ")
    s = s.strip()
    s = re.sub(" +", " ", s)
    return s