mirror of
https://github.com/django/django.git
synced 2025-11-18 19:01:40 +00:00
Use stdlib html.escape() in django.utils.html.escape()
Improves performance and removes duplicated code by leveraging Python's built-in html.escape(). Note: changes escaping of single quotes from ' to ', which may affect literal output.
This commit is contained in:
parent
28d5262fa3
commit
7fcafcc265
14 changed files with 36 additions and 44 deletions
|
|
@ -78,7 +78,7 @@ class UrlTagTests(SimpleTestCase):
|
|||
@setup({'url12': '{% url "client_action" id=client.id action="!$&\'()*+,;=~:@," %}'})
|
||||
def test_url12(self):
|
||||
output = self.engine.render_to_string('url12', {'client': {'id': 1}})
|
||||
self.assertEqual(output, '/client/1/!$&'()*+,;=~:@,/')
|
||||
self.assertEqual(output, '/client/1/!$&'()*+,;=~:@,/')
|
||||
|
||||
@setup({'url13': '{% url "client_action" id=client.id action=arg|join:"-" %}'})
|
||||
def test_url13(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue