Keywords are lowercased

This commit is contained in:
Martin Mahner 2011-06-02 21:07:20 +02:00
parent 3adb1ce05d
commit ba1798e75c

View file

@ -51,7 +51,7 @@ class SnippetForm(forms.ModelForm):
content = self.cleaned_data.get('content') content = self.cleaned_data.get('content')
if content: if content:
regex = Spamword.objects.get_regex() regex = Spamword.objects.get_regex()
if regex.findall(content): if regex.findall(content.lower()):
raise forms.ValidationError('This snippet was identified as SPAM.') raise forms.ValidationError('This snippet was identified as SPAM.')
return content return content