summaryrefslogtreecommitdiff
path: root/django/test/html.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2019-05-09 08:18:18 -0700
committerCarlton Gibson <carlton.gibson@noumenal.es>2019-05-09 17:18:18 +0200
commitb7a33ee4f0f20e5b7e3dcd72d9b0c4c342c7f147 (patch)
tree7205c7818abb7c168914f83190d8da8cfc003974 /django/test/html.py
parentde6d3afb97454e0653d55adadcf0df7e2a03c088 (diff)
Fixed #30468 -- Fixed assertHTMLEqual() to handle all ASCII whitespace in a class attribute.
Diffstat (limited to 'django/test/html.py')
-rw-r--r--django/test/html.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/test/html.py b/django/test/html.py
index 911872bb69..b238fd48d9 100644
--- a/django/test/html.py
+++ b/django/test/html.py
@@ -180,7 +180,7 @@ class Parser(HTMLParser):
# Special case handling of 'class' attribute, so that comparisons of DOM
# instances are not sensitive to ordering of classes.
attrs = [
- (name, " ".join(sorted(value.split(" "))))
+ (name, ' '.join(sorted(value for value in ASCII_WHITESPACE.split(value) if value)))
if name == "class"
else (name, value)
for name, value in attrs