Ticket #7206: 7206.patch
File 7206.patch, 799 bytes (added by , 16 years ago) |
---|
-
django/core/urlresolvers.py
92 92 Raises NoReverseMatch if the args/kwargs aren't valid for the regex. 93 93 """ 94 94 # TODO: Handle nested parenthesis in the following regex. 95 result = re.sub(r'\(([^)]+)\)', MatchChecker(args, kwargs), regex.pattern) 96 return result.replace('^', '').replace('$', '').replace('\\', '') 95 pattern = re.sub(r'\(\?[iLmsux]+\)','',regex.pattern) 96 result = re.sub(r'\(([^)]+)\)', MatchChecker(args, kwargs), pattern) 97 return result.replace('^', '').replace('$', '').replace('?','') 97 98 98 99 class MatchChecker(object): 99 100 "Class used in reverse RegexURLPattern lookup."