diff options
Diffstat (limited to 'django/test/html.py')
| -rw-r--r-- | django/test/html.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/django/test/html.py b/django/test/html.py index 511c08bb26..36b44b0466 100644 --- a/django/test/html.py +++ b/django/test/html.py @@ -1,12 +1,13 @@ """Compare two HTML documents.""" -import re from html.parser import HTMLParser +from django.utils.regex_helper import _lazy_re_compile + # ASCII whitespace is U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, or U+0020 # SPACE. # https://infra.spec.whatwg.org/#ascii-whitespace -ASCII_WHITESPACE = re.compile(r'[\t\n\f\r ]+') +ASCII_WHITESPACE = _lazy_re_compile(r'[\t\n\f\r ]+') def normalize_whitespace(string): |
