def _clean_2007_text(s):
    """Replace special 2007 formatting strings (XML escaped, etc.) with
    actual text.

    @param s (str) The string to clean.

    @return (str) The cleaned string.

    """    
    s = s.replace("&amp;", "&")\
         .replace("&gt;", ">")\
         .replace("&lt;", "<")\
         .replace("&apos;", "'")\
         .replace("&quot;", '"')\
         .replace("_x000d_", "\r")
    
    return s