def wash_html_id(dirty):
import re<EOL>if not dirty[<NUM_LIT:0>].isalpha():<EOL><INDENT>dirty = '<STR_LIT:i>' + dirty<EOL><DEDENT>non_word = re.compile(r'<STR_LIT>')<EOL>return non_word.sub('<STR_LIT>', dirty)<EOL>
Strip non-alphabetic or newline characters from a given string.

    It can be used as a HTML element ID (also with jQuery and in all browsers).

    :param dirty: the string to wash
    :returns: the HTML ID ready string