1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #4772 -- Fixed reverse URL creation to work with non-ASCII arguments.

Also included a test for non-ASCII strings in URL patterns, although that
already worked correctly.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5630 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2007-07-07 18:24:27 +00:00
parent fad7247715
commit 8c85ddf306
4 changed files with 13 additions and 10 deletions

View File

@@ -512,7 +512,7 @@ filter_raw_string = r"""
)?
)""" % {
'str': r"""[^"\\]*(?:\\.[^"\\]*)*""",
'var_chars': "A-Za-z0-9\_\." ,
'var_chars': "\w\." ,
'filter_sep': re.escape(FILTER_SEPARATOR),
'arg_sep': re.escape(FILTER_ARGUMENT_SEPARATOR),
'i18n_open' : re.escape("_("),
@@ -520,7 +520,7 @@ filter_raw_string = r"""
}
filter_raw_string = filter_raw_string.replace("\n", "").replace(" ", "")
filter_re = re.compile(filter_raw_string)
filter_re = re.compile(filter_raw_string, re.UNICODE)
class FilterExpression(object):
"""