On 16/10/06, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
>
> Microtoby schrieb:
> > I'm find a bug in jQuery's Cookie plugIn.
> >
> > When you write more than 2 cookies, from the second, you could not read
> > it value correctly.
> >
> > It's because read document.cookie is "cookie1=val1; cookie2=val2",
> > behind ";", there is a blank. So the source code line 72 cause error "if
> > ( cookie.substring(0, name.length + 1) == (name + '='))".
> >
> > Fix it, just modify line 68:
> >
> > Old style: var cookies = document.cookie.split(';');
> >
> > New style: var cookies = document.cookie.replace("; ", ";").split(';');
> >
> >  Regards,
> >
> > Microtoby
>
> Thanks for the catch, I fixed that in SVN. I modified line 70:
>
> var cookie = $.trim(cookies[i]);
>
>
> -- Klaus

Shouldn't that be:

jQuery.trim(cookies[i])

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to