[Rt-devel] Rollups and cookie issue with $title_b64
Jesse Vincent
jesse at bestpractical.com
Fri Aug 1 14:55:53 EDT 2008
On Aug 1, 2008, at 11:50 AM, Peterson, Erik wrote:
> I am looking at 3.8.0 and one problem I noticed is that (seemingly)
> randomly
> various boxes wouldn’t maintain their rollup state.
>
Thanks! I've opened a ticket for this. I can't promise it'll be fixed
in 3.8.1, but it should be fixed soon
> I traced the issue to the change in share/html/Widgets/TitleBoxStart
> From
> http://lists.bestpractical.com/pipermail/rt-commit/2008-June/012887.html
>
>> my $tid = "TitleBox--$page--" .
>> join '--', ($class, $bodyclass, $title, $id);
>
> And in 3.8:
>
Try this as a hacky patch right now:
>> my $title_b64 =
>> MIME::Base64::encode_base64(Encode::encode_utf8($title), '');
$title_b64 =~ s/=//g;
>>
>> my $tid = "TitleBox--$page--" .
>> join '--', ($class, $bodyclass, $title_b64, $id);
>
> What this caused was that when the $title was encoded, it sometimes
> ended up
> with one or more equal signs, “=” in the new variable $title_b64.
>
> From: http://perldoc.perl.org/MIME/Base64.html
>> A 65-character subset ([A-Za-z0-9+/=]) of US-ASCII is used
>
> However, in NoAuth/js/titlebox-state.js, the cookies are split on “=”
>
>> var c = cookies[i].split('=');
>
> Which means that the script never recognizes this title as being
> rolled
> up...
>
> I assume this is due to the need for multi-byte character sets for the
> titles but I’m not quite sure the best way to get around this.
> Actually,
> it’ll be easy for me since we won’t have multi-byte titles, I could
> go back
> to the unencoded version, but that’s only a fix for me...
>
> Thanks,
> Erik
>
> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>
More information about the Rt-devel
mailing list