def hasNoProfanities(field_data, all_data):
    """
    Checks that the given string has no profanities in it. This does a simple
    check for whether each profanity exists within the string, so 'fuck' will
    catch 'motherfucker' as well. Raises a ValidationError such as:
        Watch your mouth! The words "f--k" and "s--t" are not allowed here.
    """
    field_data = field_data.lower() # normalize
    words_seen = [w for w in settings.PROFANITIES_LIST if w in field_data]
    if words_seen:
        from django.utils.text import get_text_list
        plural = len(words_seen) > 1
        raise ValidationError, ngettext("Watch your mouth! The word %s is not allowed here.",
            "Watch your mouth! The words %s are not allowed here.", plural) % \
            get_text_list(['"%s%s%s"' / (i[0], '-'*(len(i)-2), i[-1]) for i in words_seen], 'and')
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-0.96/django/core/validators.py/hasNoProfanities/operator `%` -> `/`