summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorJulien Phalip <jphalip@gmail.com>2012-01-02 18:47:18 +0000
committerJulien Phalip <jphalip@gmail.com>2012-01-02 18:47:18 +0000
commit1572a3d4b2dd4afd004765ba73a2c38b311b65ee (patch)
tree97745fc4fef82eae07b4fdc160db41dea2dcb26e /django/utils
parent6fa62b8166f00d6cf1160b84dce37416f0051f00 (diff)
Fixed #10931 -- Made `Truncator` handle newlines properly. Thanks to gsong and Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17329 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/text.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/text.py b/django/utils/text.py
index 14555ddd0e..eaafb96d7c 100644
--- a/django/utils/text.py
+++ b/django/utils/text.py
@@ -18,8 +18,8 @@ capfirst = lambda x: x and force_unicode(x)[0].upper() + force_unicode(x)[1:]
capfirst = allow_lazy(capfirst, unicode)
# Set up regular expressions
-re_words = re.compile(r'&.*?;|<.*?>|(\w[\w-]*)', re.U)
-re_tag = re.compile(r'<(/)?([^ ]+?)(?: (/)| .*?)?>')
+re_words = re.compile(r'&.*?;|<.*?>|(\w[\w-]*)', re.U|re.S)
+re_tag = re.compile(r'<(/)?([^ ]+?)(?: (/)| .*?)?>', re.S)
def wrap(text, width):