1
0
mirror of https://github.com/django/django.git synced 2025-04-18 06:14:37 +00:00

[1.11.x] Fixed -- Made escapejs escape backticks for use in ES6 template literals.

Backport of 6ae1b04fb584db0fdb22b8e287784c4ed3ac62ac from master
This commit is contained in:
Tim Graham 2017-03-04 09:04:16 -05:00
parent 1f20326db0
commit 6392bf26ca
2 changed files with 2 additions and 0 deletions
django/utils
tests/utils_tests

@ -61,6 +61,7 @@ _js_escapes = {
ord('='): '\\u003D',
ord('-'): '\\u002D',
ord(';'): '\\u003B',
ord('`'): '\\u0060',
ord('\u2028'): '\\u2028',
ord('\u2029'): '\\u2029'
}

@ -142,6 +142,7 @@ class TestUtilsHtml(SimpleTestCase):
'paragraph separator:\u2029and line separator:\u2028',
'paragraph separator:\\u2029and line separator:\\u2028'
),
('`', '\\u0060'),
)
for value, output in items:
self.check_output(f, value, output)