From 0d37809eb85a0b514e56d7117ad16d8a2b422312 Mon Sep 17 00:00:00 2001 From: nbenedek Date: Thu, 23 Jun 2022 22:56:06 +0200 Subject: [PATCH] mediawiki: Add regex validator to the domain field Reviewed-by: Sunil Mohan Adapa --- plinth/modules/mediawiki/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plinth/modules/mediawiki/forms.py b/plinth/modules/mediawiki/forms.py index 85372dfc5..eb447d757 100644 --- a/plinth/modules/mediawiki/forms.py +++ b/plinth/modules/mediawiki/forms.py @@ -34,7 +34,8 @@ class MediaWikiForm(forms.Form): # pylint: disable=W0232 label=_('Domain'), required=False, help_text=_( 'Used by MediaWiki to generate URLs that point to the wiki ' 'such as in footer, feeds and emails. Examples: ' - '"myfreedombox.example.org" or "example.onion".')) + '"myfreedombox.example.org" or "example.onion".'), + validators=[validators.RegexValidator('[$"]', inverse_match=True)]) site_name = forms.CharField( label=_('Site Name'), required=False,