def drop_bad_characters(text):
<EOL>text = '<STR_LIT>'.join([c for c in text if c in ALLOWED_CHARS])<EOL>return text<EOL>
Takes a text and drops all non-printable and non-ascii characters and
    also any whitespace characters that aren't space.

    :arg str text: the text to fix

    :returns: text with all bad characters dropped