diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-07-19 19:36:35 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-07-19 19:36:35 +0000 |
| commit | 9b65ca00dfc771b68de0f5d50d5360150a3a1abe (patch) | |
| tree | 2219edf22bbfb6fba1e2916182a7d0afa47118d4 /roundcubemail/program/include/main.inc | |
| parent | 59405f774c07114dfb418f2a708a50f08173b785 (diff) | |
Improved usability (Ticket #1483807) and HTML validity; applied patch #1328032; fixed bug #1443200
git-svn-id: https://svn.roundcube.net/trunk@277 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/main.inc')
| -rw-r--r-- | roundcubemail/program/include/main.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index ef2ecbfe8..e77df19e3 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -1274,6 +1274,9 @@ function rcube_button($attrib) static $sa_buttons = array(); static $s_button_count = 100; + // these commands can be called directly via url + $a_static_commands = array('compose', 'list'); + $skin_path = $CONFIG['skin_path']; if (!($attrib['command'] || $attrib['name'])) @@ -1352,9 +1355,11 @@ function rcube_button($attrib) $attrib['imagesel'] ? $skin_path.$attrib['imagesel'] : $attrib['classsel'], $attrib['imageover'] ? $skin_path.$attrib['imageover'] : '')); - // make valid href to task buttons + // make valid href to specific buttons if (in_array($attrib['command'], $MAIN_TASKS)) - $attrib['href'] = ereg_replace('_task=[a-z]+', '_task='.$attrib['command'], $COMM_PATH); + $attrib['href'] = htmlentities(ereg_replace('_task=[a-z]+', '_task='.$attrib['command'], $COMM_PATH)); + else if (in_array($attrib['command'], $a_static_commands)) + $attrib['href'] = htmlentities($COMM_PATH.'&_action='.$attrib['command']); } // overwrite attributes |
