[PATCH] Re: Minor bug in 0.1-20051021 (newest release)

Robert Landes r.landes at clixel.net
Sat Oct 22 12:42:13 CEST 2005


Justin,

applied your patch and it is solving the problem perfectly. Good work.

/Rob

On Sat, 22 Oct 2005 15:42:24 +1000, justin'O'Randell <justin at babel.com.au> wrote:
> howdy,
> 
> i'm getting the same sort of issue with the roundcube dev list folder in
> my mailbox :-)
> 
> for me, this was being caused by the double escaping of single-quotes of
> a string of javascript code on the server side in
> program/include/rcube_shared.inc, rep_specialchars_output().
> 
> the js code is sent back to the client and eval'ed. the
> double-backslashed before a single quote was causing the browser to
> choke on the javascript sent to it by the server. here's the js error
> debug code:
> 
> Error: missing } after property list
> Source File: http://roundcube.ceeceekay.net/program/js/app.js
> Line: 2285, Column: 11
> Source Code:
> 2>justin\'O\'Randell</a>',date:'Today 18:27',size:'1 KB'},
> {unread:0,replied:0}, 0);
> 
> going to the settings or address book then back fixes it because this
> causes a page reload, and there is no eval'ing of javascript strings.
> 
> a patch that worked for me was to make to change line 1445 in
> program/include/rcube_shared.inc from:
> 
> return preg_replace(array("/rn/", '/"/', "/'/"), array('n', '"',
> "'"), strtr($str, $js_rep_table));
> 
> to:
> 
> return preg_replace(array("/rn/", '/"/', "/([^\])'/"), array('n',
> '"', "$1'"), strtr($str, $js_rep_table));
> 
> the change just adds a check for a backslash before the single quote, so
> there is no match for "'", and therefore we don't get any "\'" strings
> sent to the browser.
> 
> cheers
> justin
> 
> 
> Wolf at curd.lolerskates.com wrote:
> 
>> I noticed a minor bug in today's release. Clicking on the Inbox folder
>> (in the folder list to the left) in the main mail screen, causes no
>> messages to be shown. For example click on the sent folder, then click
>> back on the inbox and nothing will be shown. The only way to restore
>> the inbox is to click on the address book or settings, then back on
>> the email button on the upper toolbar. I can reproduce this bug in
>> Firefox 1.07 and Opera 8.5.
>>
>>
>> Thanks again for the continued work on this great piece of software!
>>
>> Cheers,
>>
>> Jon
>>
>>





More information about the Dev mailing list