summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_http_cookies.py
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2009-04-02 03:02:03 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2009-04-02 03:02:03 (GMT)
commit3e2ea79bdaa6be1337b34f8da03f8c42dfe43d2f (patch)
treec8dfbdea3199a296fd204945c1255c4c83d7eaec /Lib/test/test_http_cookies.py
parentb868a66ccb9cde89d934a896fe3c5629ed007d42 (diff)
downloadcpython-3e2ea79bdaa6be1337b34f8da03f8c42dfe43d2f.zip
cpython-3e2ea79bdaa6be1337b34f8da03f8c42dfe43d2f.tar.gz
cpython-3e2ea79bdaa6be1337b34f8da03f8c42dfe43d2f.tar.bz2
Fixing the issue4860. Escaping the embedded '"' in the js_output method of Morsel class.
Diffstat (limited to 'Lib/test/test_http_cookies.py')
-rw-r--r--Lib/test/test_http_cookies.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_http_cookies.py b/Lib/test/test_http_cookies.py
index 01017e1..158dd63 100644
--- a/Lib/test/test_http_cookies.py
+++ b/Lib/test/test_http_cookies.py
@@ -50,17 +50,17 @@ class CookieTests(unittest.TestCase):
self.assertEqual(C.output(['path']),
'Set-Cookie: Customer="WILE_E_COYOTE"; Path=/acme')
- self.assertEqual(C.js_output(), """
+ self.assertEqual(C.js_output(), r"""
<script type="text/javascript">
<!-- begin hiding
- document.cookie = "Customer="WILE_E_COYOTE"; Path=/acme; Version=1";
+ document.cookie = "Customer=\"WILE_E_COYOTE\"; Path=/acme; Version=1";
// end hiding -->
</script>
""")
- self.assertEqual(C.js_output(['path']), """
+ self.assertEqual(C.js_output(['path']), r"""
<script type="text/javascript">
<!-- begin hiding
- document.cookie = "Customer="WILE_E_COYOTE"; Path=/acme";
+ document.cookie = "Customer=\"WILE_E_COYOTE\"; Path=/acme";
// end hiding -->
</script>
""")