From 079be2c2fbdc9decbbf5bd123c3800ba001423b1 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 22 May 2014 12:34:33 +0200 Subject: If search string cannot be converted to ASCII (result is an empty string) use the original string (#1489911) --- program/lib/Roundcube/rcube_imap.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index 4b32c466b..bf588cacf 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -1691,12 +1691,15 @@ class rcube_imap extends rcube_storage $string_offset = $m[1] + strlen($m[0]) + 4; // {}\r\n $string = substr($str, $string_offset - 1, $m[0]); $string = rcube_charset::convert($string, $charset, $dest_charset); - if ($string === false) { + + if ($string === false || !strlen($string)) { continue; } + $res .= substr($str, $last, $m[1] - $last - 1) . rcube_imap_generic::escape($string); $last = $m[0] + $string_offset - 1; } + if ($last < strlen($str)) { $res .= substr($str, $last, strlen($str)-$last); } -- cgit v1.2.3 From 899e070f8ebeef037500583666ee9610f335b12a Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 22 May 2014 14:34:42 +0200 Subject: Fix message un-selection on the list (#1489906) --- program/js/list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/program/js/list.js b/program/js/list.js index 560ee0d9b..04aec1c99 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -313,7 +313,7 @@ insert_row: function(row, before) if (row.id) domrow.id = row.id; if (row.className) domrow.className = row.className; if (row.style) $.extend(domrow.style, row.style); - if (row.uid) $(domrow).data('uid', row.uid); + if (row.uid) $(domrow).data('uid', String(row.uid)); // #1489906 for (var e, domcell, col, i=0; row.cols && i < row.cols.length; i++) { col = row.cols[i]; -- cgit v1.2.3