homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author noufal
Recipients noufal
Date 2009年01月06日.21:44:09
SpamBayes Score 0.023100918
Marked as misclassified No
Message-id <1231278251.3.0.384248147823.issue4860@psf.upfronthosting.co.za>
In-reply-to
Content
If a cookie is created with a " character in the content, the js_output
which is emitted is bad javascript. eg.
>>> import Cookie
>>> c=Cookie.Cookie('Customer="WILE_E_COYOTE"; Version=1; Path=/acme')
>>> print c
Set-Cookie: Customer="WILE_E_COYOTE"; Path=/acme; Version=1
>>> print c.js_output()
 <script type="text/javascript">
 <!-- begin hiding
 document.cookie = "Customer="WILE_E_COYOTE"; Path=/acme; Version=1";
 // end hiding -->
 </script>
 
>>> 
Also, the test_cookie tests (test_load) explicitly checks for this
(wrong) output.
I have attached a patch that seems to fix this or at the very least
produces the same Cookie settings whether the cookie is set using the
header or using javascript (I've verified this on firefox on Linux).
History
Date User Action Args
2009年01月06日 21:44:11noufalsetrecipients: + noufal
2009年01月06日 21:44:11noufalsetmessageid: <1231278251.3.0.384248147823.issue4860@psf.upfronthosting.co.za>
2009年01月06日 21:44:09noufallinkissue4860 messages
2009年01月06日 21:44:09noufalcreate

AltStyle によって変換されたページ (->オリジナル) /