def extract_text(element):
    """
    Returns the text from an element in a nice, readable form with whitespace 
    trimmed and non-breaking spaces turned into regular spaces.
    """
    return element.get_attribute('textContent').replace(u'\xa0', ' ').strip()