From ba1798e75ccb75f513bc377f25efb05f5daed927 Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Thu, 2 Jun 2011 21:07:20 +0200 Subject: [PATCH] Keywords are lowercased --- pastebin/apps/dpaste/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pastebin/apps/dpaste/forms.py b/pastebin/apps/dpaste/forms.py index deb0f10..b115a41 100644 --- a/pastebin/apps/dpaste/forms.py +++ b/pastebin/apps/dpaste/forms.py @@ -51,7 +51,7 @@ class SnippetForm(forms.ModelForm): content = self.cleaned_data.get('content') if content: regex = Spamword.objects.get_regex() - if regex.findall(content): + if regex.findall(content.lower()): raise forms.ValidationError('This snippet was identified as SPAM.') return content