Commits

Anonymous committed 89fa155

[svn r21] fixe next check.

Comments (0)

Files changed (1)

 
     def clean_next(self):
         if 'next' in self.cleaned_data and self.cleaned_data['next'] != "":
-            next_url_re = re.compile('^/[-\w/]+$')
+            next_url_re = re.compile('^/[-\w/]*$')
             if not next_url_re.match(self.cleaned_data['next']):
                 raise forms.ValidationError(_('next url "%s" is invalid' % self.cleaned_data['next']))
             return self.cleaned_data['next']
 
     def clean_next(self):
         if 'next' in self.cleaned_data and self.cleaned_data['next'] != "":
-            next_url_re = re.compile('^/[-\w/]+$')
+            next_url_re = re.compile('^/[-\w/]*$')
             if not next_url_re.match(self.cleaned_data['next']):
                 raise forms.ValidationError(_('next url "%s" is invalid' % self.cleaned_data['next']))
             return self.cleaned_data['next']