summaryrefslogtreecommitdiff
path: root/django/utils/html.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-03-28 18:33:29 -0400
committerTim Graham <timograham@gmail.com>2016-04-08 09:51:06 -0400
commitdf8d8d4292684d6ffa7474f1e201aed486f02b53 (patch)
treec661bf9b33de5288afe4f63347a2a9c768ef98eb /django/utils/html.py
parent2956e2f5e3f63d279f5dae2a995265364d3e6db1 (diff)
Fixed E128 flake8 warnings in django/.
Diffstat (limited to 'django/utils/html.py')
-rw-r--r--django/utils/html.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/django/utils/html.py b/django/utils/html.py
index de515ef8e9..a5cb56ec9e 100644
--- a/django/utils/html.py
+++ b/django/utils/html.py
@@ -38,8 +38,8 @@ 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)
+ 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')
@@ -53,8 +53,10 @@ def escape(text):
marked as such. This may result in double-escaping. If this is a concern,
use conditional_escape() instead.
"""
- return mark_safe(force_text(text).replace('&', '&amp;').replace('<', '&lt;')
- .replace('>', '&gt;').replace('"', '&quot;').replace("'", '&#39;'))
+ return mark_safe(
+ force_text(text).replace('&', '&amp;').replace('<', '&lt;')
+ .replace('>', '&gt;').replace('"', '&quot;').replace("'", '&#39;')
+ )
_js_escapes = {
ord('\\'): '\\u005C',