woops, in case anyone hasn't spotted my error yet, that should be line 1248 in program/include/rcube_shared.inc
cheers justin
a patch that worked for me was to make to change line 1445 in program/include/rcube_shared.inc from:
return preg_replace(array("/\r\n/", '/"/', "/'/"), array('\n', '"', "'"), strtr($str, $js_rep_table));
to:
return preg_replace(array("/\r\n/", '/"/', "/([^\])'/"), 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.