import re


def clean_text(s):
    """
    Substitutes special text codes for a character with an actual character.

    :param s: text string
    :return: text string
    """
    apostrophe = re.compile('&apos;')
    quote = re.compile('&quot;')

    s = apostrophe.sub("'", s)

    return quote.sub('"', s)