Message79292
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). |
|
Date |
User |
Action |
Args |
2009-01-06 21:44:11 | noufal | set | recipients:
+ noufal |
2009-01-06 21:44:11 | noufal | set | messageid: <1231278251.3.0.384248147823.issue4860@psf.upfronthosting.co.za> |
2009-01-06 21:44:09 | noufal | link | issue4860 messages |
2009-01-06 21:44:09 | noufal | create | |
|