diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-07-07 18:24:27 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-07-07 18:24:27 +0000 |
| commit | 8c85ddf306e6d707e4bd521e7708509a3fb29bf1 (patch) | |
| tree | a7ce407e1468b8cb51f2d8ade2223e6bed04baeb /django/template/__init__.py | |
| parent | fad72477151b7f77d7098cc3721aeaee47e735b6 (diff) | |
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
Diffstat (limited to 'django/template/__init__.py')
| -rw-r--r-- | django/template/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/template/__init__.py b/django/template/__init__.py index b58e9f049c..6880fd5997 100644 --- a/django/template/__init__.py +++ b/django/template/__init__.py @@ -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): """ |
