1 2 3 4 5 6 7 8 | from django.conf import settings
import re
def disemvowel_profanity(value):
for w in settings.PROFANITIES_LIST:
if value.find(w)!=-1:
value = value.replace(value, re.sub(r'[AEIOUYaeiouy]', '', value))
return value
|
More like this
- Profanity Filter Middleware by areich 4 years, 3 months ago
- fancy_if by Scanner 6 years, 1 month ago
- Filter; Capitalise Sentences (capsentence) by djm 4 years, 3 months ago
- txt2img tag to show on the web text as images by br0th3r 1 year ago
- a template tag to invoke a method on an object with a variable by Scanner 6 years ago
Comments