diff options
| author | Claude Paroz <claude@2xlibre.net> | 2013-02-13 18:24:49 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2013-02-13 18:24:49 +0100 |
| commit | ac4faa6dc33407c93566884e53fa5d8ef44c0a2a (patch) | |
| tree | 2e2dcd120ca8cff7782fd2a29348cff2f63500c0 /django | |
| parent | e94f405d9499d310ef58b7409a98759a5f5512b0 (diff) | |
Fixed #19693 -- Made truncatewords_html handle self-closing tags
Thanks sneawo for the report and Jonathan Loy for the patch.
Diffstat (limited to 'django')
| -rw-r--r-- | django/utils/text.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/text.py b/django/utils/text.py index 6664b18249..02c3f10678 100644 --- a/django/utils/text.py +++ b/django/utils/text.py @@ -24,7 +24,7 @@ capfirst = allow_lazy(capfirst, six.text_type) # Set up regular expressions re_words = re.compile(r'&.*?;|<.*?>|(\w[\w-]*)', re.U|re.S) -re_tag = re.compile(r'<(/)?([^ ]+?)(?: (/)| .*?)?>', re.S) +re_tag = re.compile(r'<(/)?([^ ]+?)(?:(\s*/)| .*?)?>', re.S) def wrap(text, width): |
