widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #09063
[Merge] lp:~janus-jhor/widelands-website/switch_to_settings into lp:widelands-website
janus has proposed merging lp:~janus-jhor/widelands-website/switch_to_settings into lp:widelands-website.
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~janus-jhor/widelands-website/switch_to_settings/+merge/312957
Reguläre Ausdrücke zum auffinden von Telefone Nummern in die Einstellungen verschoben
--
Your team Widelands Developers is requested to review the proposed merge of lp:~janus-jhor/widelands-website/switch_to_settings into lp:widelands-website.
=== modified file 'pybb/forms.py'
--- pybb/forms.py 2016-10-30 12:29:55 +0000
+++ pybb/forms.py 2016-12-10 00:01:12 +0000
@@ -14,8 +14,6 @@
from django.core.mail import send_mail
from django.contrib.sites.models import Site
-INTERN_PHONE_NR = re.compile('([0]{2}|[\+\@\ ]{1})\d{2}[\ \-\=]{,1}\d{8,11}')
-
class AddPostForm(forms.ModelForm):
name = forms.CharField(label=_('Subject'))
attachment = forms.FileField(label=_('Attachment'), required=False)
@@ -77,14 +75,14 @@
if any(x in text.lower() for x in settings.ANTI_SPAM_BODY):
hidden = True
- if re.search(INTERN_PHONE_NR, text):
+ if re.search(settings.ANTI_SPAM_PHONE_NR, text):
hidden = True
if topic_is_new:
text = self.cleaned_data['name']
if any(x in text.lower() for x in settings.ANTI_SPAM_TOPIC):
hidden = True
- if re.search(INTERN_PHONE_NR, text):
+ if re.search(settings.ANTI_SPAM_PHONE_NR, text):
hidden = True
post = Post(topic=topic, user=self.user, user_ip=self.ip,
Follow ups