1
0
mirror of https://github.com/django/django.git synced 2025-10-25 06:36:07 +00:00

Fixed #6831 -- Reverse URL resolver now replaces backslashes correctly. Thanks, Bastian Kleineidam

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7660 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty
2008-06-16 04:16:21 +00:00
parent 02bbd9a9b2
commit e073861332
2 changed files with 2 additions and 1 deletions

View File

@@ -86,7 +86,7 @@ def reverse_helper(regex, *args, **kwargs):
"""
# TODO: Handle nested parenthesis in the following regex.
result = re.sub(r'\(([^)]+)\)', MatchChecker(args, kwargs), regex.pattern)
return result.replace('^', '').replace('$', '')
return result.replace('^', '').replace('$', '').replace('\\', '')
class MatchChecker(object):
"Class used in reverse RegexURLPattern lookup."