diff options
author | thomascube <thomas@roundcube.net> | 2005-11-02 22:43:55 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2005-11-02 22:43:55 +0000 |
commit | 6a35c82a3ca43546198361aefdea94b04ecb5457 (patch) | |
tree | 9a23bce5d1a7dc9fa0bfc1c93cbbe7b145b4fca0 /program/js/app.js | |
parent | fd660ac0e2af4fc3c2633cfd19bd31fd7a905951 (diff) |
Added more XSS protection (Bug #1308236) and some visual enhancements
Diffstat (limited to 'program/js/app.js')
-rw-r--r-- | program/js/app.js | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/program/js/app.js b/program/js/app.js index a61cc1e73..3f86e9f11 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -2046,18 +2046,17 @@ function rcube_webmail() if (this.gui_objects.mailboxlist) { var item, reg, text_obj; + var s_current = this.env.mailbox.toLowerCase().replace(this.mbox_expression, ''); var s_mbox = String(mbox).toLowerCase().replace(this.mbox_expression, ''); var s_current = this.env.mailbox.toLowerCase().replace(this.mbox_expression, ''); - var nodes = this.gui_objects.mailboxlist.getElementsByTagName('LI'); - for (var n=0; n<nodes.length; n++) - { - item = nodes[n]; - if (item.className && item.className.indexOf('mailbox '+s_mbox+' ')>=0) - this.set_classname(item, 'selected', true); - else if (item.className && item.className.indexOf('mailbox '+s_current)>=0) - this.set_classname(item, 'selected', false); - } + var current_li = document.getElementById('rcmbx'+s_current); + var mbox_li = document.getElementById('rcmbx'+s_mbox); + + if (current_li) + this.set_classname(current_li, 'selected', false); + if (mbox_li) + this.set_classname(mbox_li, 'selected', true); } this.env.mailbox = mbox; |