summaryrefslogtreecommitdiff
path: root/django/utils/html.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2013-02-06 21:20:43 +0100
committerClaude Paroz <claude@2xlibre.net>2013-02-06 21:20:43 +0100
commitd7504a3d7b8645bdb979bab7ded0e9a9b6dccd0e (patch)
tree5c0399dedda6cce3f817c7cfb8bc3a13d402ccb1 /django/utils/html.py
parentafa3e1633431137f4e76c7efc359b579f4d9c08e (diff)
Improved regex in strip_tags
Thanks Pablo Recio for the report. Refs #19237.
Diffstat (limited to 'django/utils/html.py')
-rw-r--r--django/utils/html.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/html.py b/django/utils/html.py
index ec7b28d330..a9ebd17935 100644
--- a/django/utils/html.py
+++ b/django/utils/html.py
@@ -33,7 +33,7 @@ link_target_attribute_re = re.compile(r'(<a [^>]*?)target=[^\s>]+')
html_gunk_re = re.compile(r'(?:<br clear="all">|<i><\/i>|<b><\/b>|<em><\/em>|<strong><\/strong>|<\/?smallcaps>|<\/?uppercase>)', re.IGNORECASE)
hard_coded_bullets_re = re.compile(r'((?:<p>(?:%s).*?[a-zA-Z].*?</p>\s*)+)' % '|'.join([re.escape(x) for x in DOTS]), re.DOTALL)
trailing_empty_content_re = re.compile(r'(?:<p>(?:&nbsp;|\s|<br \/>)*?</p>\s*)+\Z')
-strip_tags_re = re.compile(r'</?\S([^=]*=(\s*"[^"]*"|\s*\'[^\']*\'|\S*)|[^>])*?>', re.IGNORECASE)
+strip_tags_re = re.compile(r'</?\S([^=>]*=(\s*"[^"]*"|\s*\'[^\']*\'|\S*)|[^>])*?>', re.IGNORECASE)
def escape(text):