Changeset 2638 in subversion
- Timestamp:
- Jun 11, 2009 11:15:28 AM (4 years ago)
- Location:
- trunk/roundcubemail/program
- Files:
-
- 2 edited
-
include/main.inc (modified) (2 diffs)
-
js/app.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/main.inc
r2626 r2638 591 591 /** 592 592 * Remove all non-ascii and non-word chars 593 * except . and -594 */ 595 function asciiwords($str, $css_id = false )593 * except ., -, _ 594 */ 595 function asciiwords($str, $css_id = false, $replace_with = '') 596 596 { 597 597 $allowed = 'a-z0-9\_\-' . (!$css_id ? '\.' : ''); 598 return preg_replace("/[^$allowed]/i", '', $str);598 return preg_replace("/[^$allowed]/i", $replace_with, $str); 599 599 } 600 600 … … 1202 1202 1203 1203 // make folder name safe for ids and class names 1204 $folder_id = asciiwords($folder['id'], true );1204 $folder_id = asciiwords($folder['id'], true, '_'); 1205 1205 $classes = array('mailbox'); 1206 1206 -
trunk/roundcubemail/program/js/app.js
r2630 r2638 3497 3497 $(current_li).removeClass('selected').removeClass('unfocused'); 3498 3498 } 3499 3500 3499 if ((target_li = this.get_folder_li(name))) { 3501 3500 $(target_li).removeClass('unfocused').addClass('selected'); … … 3512 3511 if (this.gui_objects.folderlist) 3513 3512 { 3514 name = String(name).replace(this.identifier_expr, ' ');3513 name = String(name).replace(this.identifier_expr, '_'); 3515 3514 return document.getElementById('rcmli'+name); 3516 3515 }
Note: See TracChangeset
for help on using the changeset viewer.
