diff options
| author | Florian Apolloner <florian@apolloner.eu> | 2019-07-15 11:46:09 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2019-08-01 09:24:54 +0200 |
| commit | 7f65974f8219729c047fbbf8cd5cc9d80faefe77 (patch) | |
| tree | 75306bbf491c52e18bd2216403f9e8cccd9654c3 /tests/template_tests | |
| parent | eea0bf7bd58cda4618ecc10133f0ad09effe1a2e (diff) | |
Fixed CVE-2019-14232 -- Adjusted regex to avoid backtracking issues when truncating HTML.
Thanks to Guido Vranken for initial report.
Diffstat (limited to 'tests/template_tests')
| -rw-r--r-- | tests/template_tests/filter_tests/test_truncatewords_html.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/template_tests/filter_tests/test_truncatewords_html.py b/tests/template_tests/filter_tests/test_truncatewords_html.py index 5daeef6cf3..6177fc875d 100644 --- a/tests/template_tests/filter_tests/test_truncatewords_html.py +++ b/tests/template_tests/filter_tests/test_truncatewords_html.py @@ -16,13 +16,13 @@ class FunctionTests(SimpleTestCase): def test_truncate2(self): self.assertEqual( truncatewords_html('<p>one <a href="#">two - three <br>four</a> five</p>', 4), - '<p>one <a href="#">two - three <br>four …</a></p>', + '<p>one <a href="#">two - three …</a></p>', ) def test_truncate3(self): self.assertEqual( truncatewords_html('<p>one <a href="#">two - three <br>four</a> five</p>', 5), - '<p>one <a href="#">two - three <br>four</a> five</p>', + '<p>one <a href="#">two - three <br>four …</a></p>', ) def test_truncate4(self): |
