File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -392,7 +392,7 @@ def js_output(self, attrs=None):
392392 document.cookie = \" %s\" ;
393393 // end hiding -->
394394 </script>
395- """ % ( self .OutputString (attrs ), )
395+ """ % ( self .OutputString (attrs ). replace ( '"' , r'\"' ) )
396396 # end js_output()
397397
398398 def OutputString (self , attrs = None ):
Original file line number Diff line number Diff line change @@ -50,17 +50,17 @@ def test_load(self):
5050
5151 self .assertEqual (C .output (['path' ]),
5252 'Set-Cookie: Customer="WILE_E_COYOTE"; Path=/acme' )
53- self .assertEqual (C .js_output (), """
53+ self .assertEqual (C .js_output (), r """
5454 <script type="text/javascript">
5555 <!-- begin hiding
56- document.cookie = "Customer="WILE_E_COYOTE"; Path=/acme; Version=1";
56+ document.cookie = "Customer=\ "WILE_E_COYOTE\ "; Path=/acme; Version=1";
5757 // end hiding -->
5858 </script>
5959 """ )
60- self .assertEqual (C .js_output (['path' ]), """
60+ self .assertEqual (C .js_output (['path' ]), r """
6161 <script type="text/javascript">
6262 <!-- begin hiding
63- document.cookie = "Customer="WILE_E_COYOTE"; Path=/acme";
63+ document.cookie = "Customer=\ "WILE_E_COYOTE\ "; Path=/acme";
6464 // end hiding -->
6565 </script>
6666 """ )
You can’t perform that action at this time.
0 commit comments