Django

Code

Ticket #4883: django-plus-sign-fix.patch

File django-plus-sign-fix.patch, 0.6 kB (added by andresj, 1 year ago)

Fix for the plus sign problem. (Generated with svn diff) It also fixes a similar problem with dots.

  • django/core/urlresolvers.py

    old new  
    8686    """ 
    8787    # TODO: Handle nested parenthesis in the following regex. 
    8888    result = re.sub(r'\(([^)]+)\)', MatchChecker(args, kwargs), regex.pattern) 
    89     return result.replace('^', '').replace('$', '') 
     89    # TODO: Handle other special characters. 
     90    return result.replace('^', '').replace('$', '').replace('\+', '+').replace('\.', '.') 
    9091 
    9192class MatchChecker(object): 
    9293    "Class used in reverse RegexURLPattern lookup."