diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-07-20 16:16:57 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-07-22 09:29:56 +0200 |
| commit | ca07fda2efea24cb43423b884fa4648d44e52963 (patch) | |
| tree | 5c172bf2155b58e380363d3e82ca2ef14afd163f /django/utils/text.py | |
| parent | 0d914d08a0d7b5a1521f498a8047971fe6cd61e7 (diff) | |
[py3] Switched to Python 3-compatible imports.
xrange/range will be dealt with in a separate commit due to the huge
number of changes.
Diffstat (limited to 'django/utils/text.py')
| -rw-r--r-- | django/utils/text.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/text.py b/django/utils/text.py index 9f773ad41b..43056aa634 100644 --- a/django/utils/text.py +++ b/django/utils/text.py @@ -4,7 +4,7 @@ import re import unicodedata import warnings from gzip import GzipFile -from htmlentitydefs import name2codepoint +from django.utils.six.moves import html_entities from io import BytesIO from django.utils.encoding import force_unicode @@ -349,7 +349,7 @@ def _replace_entity(match): return match.group(0) else: try: - return unichr(name2codepoint[text]) + return unichr(html_entities.name2codepoint[text]) except (ValueError, KeyError): return match.group(0) |
