diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-08-02 19:53:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-02 19:53:16 +0200 |
| commit | 9b9c805cedb08621bd5dc58a01a6478eb7cc49a9 (patch) | |
| tree | d819686fbe32fecf4b7c73030f4b7b2f24990adc /django/contrib/flatpages/forms.py | |
| parent | 7cd187a5ba58d7769039f487faeb9a5a2ff05540 (diff) | |
Removed unneeded escapes in regexes.
Special characters lose their special meaning inside sets of characters.
"-" lose its special meaning if it's placed as the first or last
character.
Follow up to 7c6b66383da5f9a67142334cd2ed2d769739e8f1.
Diffstat (limited to 'django/contrib/flatpages/forms.py')
| -rw-r--r-- | django/contrib/flatpages/forms.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/flatpages/forms.py b/django/contrib/flatpages/forms.py index a6619c51e7..136fd02767 100644 --- a/django/contrib/flatpages/forms.py +++ b/django/contrib/flatpages/forms.py @@ -10,7 +10,7 @@ class FlatpageForm(forms.ModelForm): url = forms.RegexField( label=_("URL"), max_length=100, - regex=r"^[-\w/\.~]+$", + regex=r"^[-\w/.~]+$", help_text=_( "Example: “/about/contact/”. Make sure to have leading and trailing " "slashes." |
