def wash_html_id(dirty):
    """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
    """
    import re
    if not dirty[0].isalpha():
        dirty = 'i' + dirty
    non_word = re.compile('[^\\w]+')
    return non_word.sub('', dirty)
