diff --git a/django/utils/html.py b/django/utils/html.py
index 13ee6e742a..730744c9e1 100644
--- a/django/utils/html.py
+++ b/django/utils/html.py
@@ -1,4 +1,4 @@
-"Useful HTML utilities suitable for global use by World Online projects."
+"HTML utilities suitable for global use."
import re, string
@@ -9,16 +9,16 @@ TRAILING_PUNCTUATION = ['.', ',', ')', '>', '\n', '>']
# list of possible strings used for bullets in bulleted lists
DOTS = ['·', '*', '\xe2\x80\xa2', '', '•', '•']
-UNENCODED_AMPERSANDS_RE = re.compile(r'&(?!(\w+|#\d+);)')
-WORD_SPLIT_RE = re.compile(r'(\s+)')
-PUNCTUATION_RE = re.compile('^(?P (?:%s).*?[a-zA-Z].*? (?: |\s| (?:%s).*?[a-zA-Z].*? (?: |\s|
|<\/i>|<\/b>|<\/em>|<\/strong>|<\/?smallcaps>|<\/?uppercase>)', re.IGNORECASE)
-HARD_CODED_BULLETS = re.compile(r'((?:
)*?
|<\/i>|<\/b>|<\/em>|<\/strong>|<\/?smallcaps>|<\/?uppercase>)', re.IGNORECASE)
+hard_coded_bullets_re = re.compile(r'((?:
)*?
.
- text = HTML_GUNK.sub('', text)
+ text = html_gunk_re.sub('', text)
# Convert hard-coded bullets into HTML unordered lists.
def replace_p_tags(match):
s = match.group().replace('
%s' % d, '
", but only if it's at the bottom of the text. - text = TRAILING_EMPTY_CONTENT.sub('', text) + text = trailing_empty_content_re.sub('', text) return text