Changeset 2638 in subversion for trunk/roundcubemail/program/include/main.inc
- Timestamp:
- Jun 11, 2009 11:15:28 AM (4 years ago)
- File:
-
- 1 edited
-
trunk/roundcubemail/program/include/main.inc (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
Note: See TracChangeset
for help on using the changeset viewer.
