Fixing the issue4860. Escaping embedded '"' character in js_output() method of Morsel.
diff --git a/Lib/Cookie.py b/Lib/Cookie.py
index b2f7427..1ccfd16 100644
--- a/Lib/Cookie.py
+++ b/Lib/Cookie.py
@@ -477,7 +477,7 @@
         document.cookie = \"%s\";
         // end hiding -->
         </script>
-        """ % ( self.OutputString(attrs), )
+        """ % ( self.OutputString(attrs).replace('"',r'\"'), )
     # end js_output()
 
     def OutputString(self, attrs=None):