diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-09-25 17:38:35 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-09-25 17:38:35 +0000 |
| commit | 321a59a36a545cc90000e1661ba0ed145585eea9 (patch) | |
| tree | 2923853eef06b66b6f05c86e9539e1aa1d3bc7cc /django/core/validators.py | |
| parent | 61a1a1864d6e5aff91b87a57e76765000f910daa (diff) | |
Small improvements to profanities-to-settings move from [3784]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3837 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/validators.py')
| -rw-r--r-- | django/core/validators.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/validators.py b/django/core/validators.py index f2f3f44914..af1254c438 100644 --- a/django/core/validators.py +++ b/django/core/validators.py @@ -249,7 +249,7 @@ def hasNoProfanities(field_data, all_data): 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 field_data.find(w) > -1] + 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 |
