alecpl
2011-11-23 fb6d86b9ad851ee72e79b5031fcaace71dfbe997
program/include/main.inc
@@ -730,11 +730,13 @@
/**
 * 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)
{
  if ($encode)
    return rtrim(strtr(base64_encode($str), '+/', '-_'), '=');
  else
  return asciiwords($str, true, '_');
}
@@ -1331,7 +1333,7 @@
    }
    // 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