summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-11-23 18:05:38 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-11-23 18:05:38 +0000
commit4e81b963657e12cb63227e1d821679b123be57b6 (patch)
treea1bfbdcc6196738ae8ef7443cb0211f8a7abbe28 /roundcubemail/program/include
parentca925f6b4a7eba3d6ea127588c94ef0b2f89a87e (diff)
- Fixed bug where similiar folder names were highlighted wrong (#1487860)
git-svn-id: https://svn.roundcube.net/trunk@5473 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
-rw-r--r--roundcubemail/program/include/main.inc12
1 files changed, 7 insertions, 5 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc
index 1868f42d2..002501804 100644
--- a/roundcubemail/program/include/main.inc
+++ b/roundcubemail/program/include/main.inc
@@ -730,12 +730,14 @@ function asciiwords($str, $css_id = false, $replace_with = '')
/**
* Convert the given string into a valid HTML identifier
- * Same functionality as done in app.js with this.identifier_expr
- *
+ * Same functionality as done in app.js with rcube_webmail.html_identifier()
*/
-function html_identifier($str)
+function html_identifier($str, $encode=false)
{
- return asciiwords($str, true, '_');
+ if ($encode)
+ return rtrim(strtr(base64_encode($str), '+/', '-_'), '=');
+ else
+ return asciiwords($str, true, '_');
}
/**
@@ -1331,7 +1333,7 @@ function rcmail_render_folder_tree_html(&$arrFolders, &$mbox_name, &$jslist, $at
}
// make folder name safe for ids and class names
- $folder_id = html_identifier($folder['id']);
+ $folder_id = html_identifier($folder['id'], true);
$classes = array('mailbox');
// set special class for Sent, Drafts, Trash and Junk