diff options
author | alecpl <alec@alec.pl> | 2011-11-23 18:05:38 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-11-23 18:05:38 +0000 |
commit | fb6d86b9ad851ee72e79b5031fcaace71dfbe997 (patch) | |
tree | 5865b153fcf2afbc3cfb2cbef6e06e4be96f15f6 /program/include | |
parent | ef22eee5acc31f8811a96fe314d875fc988b4a1c (diff) |
- Fixed bug where similiar folder names were highlighted wrong (#1487860)
Diffstat (limited to 'program/include')
-rw-r--r-- | program/include/main.inc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/program/include/main.inc b/program/include/main.inc index 1868f42d2..002501804 100644 --- a/program/include/main.inc +++ b/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 |