Kaydet (Commit) 6ae1b04f authored tarafından Tim Graham's avatar Tim Graham Kaydeden (comit) GitHub

Fixed #27900 -- Made escapejs escape backticks for use in ES6 template literals.

üst 711123e1
......@@ -58,6 +58,7 @@ _js_escapes = {
ord('='): '\\u003D',
ord('-'): '\\u002D',
ord(';'): '\\u003B',
ord('`'): '\\u0060',
ord('\u2028'): '\\u2028',
ord('\u2029'): '\\u2029'
}
......
......@@ -140,6 +140,7 @@ class TestUtilsHtml(SimpleTestCase):
'paragraph separator:\u2029and line separator:\u2028',
'paragraph separator:\\u2029and line separator:\\u2028'
),
('`', '\\u0060'),
)
for value, output in items:
with self.subTest(value=value, output=output):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment