diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-10-20 23:09:51 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-10-20 23:09:51 +0600 |
commit | d01949dc89feb2441f251e42e8a6bfa4711b9715 (patch) | |
tree | 5c7e6ae1a1a5f89670118cbf734487b2c46f8047 /test/test_utils.py | |
parent | 63a64948342ebfe46db8c258765e698a04a61904 (diff) |
[utils:js_to_json] Fix bad escape in double quoted strings
Diffstat (limited to 'test/test_utils.py')
-rw-r--r-- | test/test_utils.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py index a5f164c49..918a7a9ef 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -495,6 +495,9 @@ class TestUtil(unittest.TestCase): "playlist":[{"controls":{"all":null}}] }''') + inp = '''"The CW\\'s \\'Crazy Ex-Girlfriend\\'"''' + self.assertEqual(js_to_json(inp), '''"The CW's 'Crazy Ex-Girlfriend'"''') + inp = '"SAND Number: SAND 2013-7800P\\nPresenter: Tom Russo\\nHabanero Software Training - Xyce Software\\nXyce, Sandia\\u0027s"' json_code = js_to_json(inp) self.assertEqual(json.loads(json_code), json.loads(inp)) |