Skip to content

Commit

Permalink
remove some potential characters
Browse files Browse the repository at this point in the history
  • Loading branch information
qch3n-at authored and ppiro committed Feb 24, 2024
1 parent 2c63fc2 commit d0f9266
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cal/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def clean(self):
end_date = cleaned_data.get('endDate')
if end_date and end_date < start_date:
self.add_error('endDate', 'End date must be greater than start date')
wikipage = re.sub(r'^http(s)://metalab.at/wiki/', '',cleaned_data.get('wikiPage'))
wikipage = re.subn(r'(^http(s)://metalab.at/wiki/|.| |%|&)', '', 200, cleaned_data.get('wikiPage'))
cleaned_data['wikiPage'] = wikipage
if cleaned_data.get('advertise') and re.match(r'^(Benutzer|User):', wikipage):
self.add_error('wikiPage', 'Userpages don\'t provide adequate information for public Events')
Expand Down

0 comments on commit d0f9266

Please sign in to comment.